Core: Fix generated entry to import at top of file (#9398)

Core: Fix generated entry to import at top of file
This commit is contained in:
Michael Shilman 2020-01-12 23:22:07 +08:00 committed by Michael Shilman
parent 3a87eed855
commit 83191ac8d4
2 changed files with 1 additions and 17 deletions

View File

@ -51,8 +51,8 @@ export default ({
stories && stories.length
? new VirtualModulePlugin({
[path.resolve(path.join(configDir, `generated-entry.js`))]: `
import { configure } from '@storybook/${framework}';
module._StorybookPreserveDecorators = true;
import { configure, addDecorator, addParameters } from '@storybook/${framework}';
configure([${stories.map(toRequireContextString).join(',')}
], module);

View File

@ -3829,17 +3829,6 @@
remark-lint "^6.0.4"
remark-preset-lint-recommended "^3.0.2"
"@storybook/node-logger@^5.2.8":
version "5.2.8"
resolved "https://registry.yarnpkg.com/@storybook/node-logger/-/node-logger-5.2.8.tgz#4a3df21d731014d54b9ca53d5b9a72dd350bb075"
integrity sha512-3TK5mx6VWbfJO+WUrqwPhTbTQ4qESTnwJY/02xPzOhvuC6tIG1QOxzi+Rq6rFlwxTpUuWh6iyDYnGIqFFQywkA==
dependencies:
chalk "^2.4.2"
core-js "^3.0.1"
npmlog "^4.1.2"
pretty-hrtime "^1.0.3"
regenerator-runtime "^0.12.1"
"@storybook/preset-create-react-app@^1.5.0":
version "1.5.0"
resolved "https://registry.yarnpkg.com/@storybook/preset-create-react-app/-/preset-create-react-app-1.5.0.tgz#214c023790545a36bb6b551d317a8dacbb7bc1a1"
@ -26916,11 +26905,6 @@ regenerator-runtime@^0.11.0:
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9"
integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==
regenerator-runtime@^0.12.1:
version "0.12.1"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz#fa1a71544764c036f8c49b13a08b2594c9f8a0de"
integrity sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg==
regenerator-transform@^0.10.0:
version "0.10.1"
resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd"