-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLI: add warning when main config does not use default exports #20802
Conversation
I guess we should remove this suggestion from the vite builder readme, then. storybook/code/lib/builder-vite/README.md Line 137 in eb3cc8d
|
Thanks! It's addressed here #20801 |
b6d7fcc
to
07bb9b9
Compare
1b1db9f
to
8f09b18
Compare
Socket Security Pull Request Report👍 No new dependency issues detected in pull request Pull request report summary
Bot CommandsTo ignore an alert, reply with a comment starting with Powered by socket.dev |
- involves changes in csf-tools to define a flag that tells us there is (or not) a default export - involves changes in affected packages now that loadMainConfig is async
051d4ee
to
95a3b53
Compare
95a3b53
to
55ebe5b
Compare
@yannbf glob is a peer dep of glob-promise. Should probably be reinstalled.
But also is it really necessary to install an entire wrapper package just to make glob return a promise? It's just a 5 line promise wrapper. https://github.com/ahmadnassri/node-glob-promise/blob/master/lib/index.js |
I'll fix this today, thank you for bringing this to our attention @stevezhu |
Telescoping off of #20797
What I did
This PR does a couple of things:
ConfigFile
from csf-tools, where whenever you usereadConfig
, you will be able to check whether a main.js file contains a default export or not by usingmainConfig.hasDefaultExport
build-dev
,build-static
andtelemetry
. It warns users only once.Please refer to CLI: generate main config with default exports #20797 for more context.
How to test
Checklist
MIGRATION.MD
Maintainers
make sure to add the
ci:merged
orci:daily
GH label to it.["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]