-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Description
As part of addon-docs
we're using a webpack-defined variable called DOCS_MODE
to communicate from the CLI (e.g. yarn storybook --docs
) to the manager whether or not to display the "docs mode UI" (canvas hidden, etc.)
This is working successfully in the examples directories that use the --no-dll
flag. However, it is not working in the standard DLL directories such as examples/svelte-kitchen-sink
. The UI does not render and there is an error in the JS console.
This is the stack trace running in development v5.2.0-alpha.23
:
Uncaught ReferenceError: DOCS_MODE is not defined
at Object.<anonymous> (storybook_ui_dll.js:2)
at Object.SbT1 (storybook_ui_dll.js:2)
at n (storybook_ui_dll.js:2)
at Object.../../lib/ui/dist/index.js (main.5174b68e0e7dfc934e4e.bundle.js:8689)
at __webpack_require__ (runtime~main.e27e72d77edfc378d751.bundle.js:80)
at Object.../../lib/core/dist/client/manager/index.js (main.5174b68e0e7dfc934e4e.bundle.js:8523)
at __webpack_require__ (runtime~main.e27e72d77edfc378d751.bundle.js:80)
at Object.0 (main.5174b68e0e7dfc934e4e.bundle.js:10369)
at __webpack_require__ (runtime~main.e27e72d77edfc378d751.bundle.js:80)
at checkDeferredModules (runtime~main.e27e72d77edfc378d751.bundle.js:46)
Proposal
Communicate variables via globals in the page template rather than through webpack define plugin.
-
DOCS_MODE
-
PREVIEW_URL