-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Cannot resolve core-js on addon compiling #13290
Comments
it's not clear how storybook compile addons(with ts files) and how add plugins/presets to manager. I have found |
i have found
why do we need this flag? |
cc @ndelangen |
Should be fixed by #13055 |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
Closing this for now. Please let me know if there's more to be done here! |
Describe the bug
Compiling addon with typescript fails on absence babel presets
To Reproduce
Monorepo structure is following:
./subrepo1/node_modules/./bin/start-storybook
is symlink to./build/storybook/node_modules/@storybook/react
languages.ts
code is:register.js
code is:Expected behavior
./build/storybook/packages.json
wherestorybook
with other addons installed./babelrc
in./subrepo1/./storybook
with required configurationWorkaround 1
(for me it's not good solution, because i have
const enum
and need to add babel plugins for it)Disable
useBuiltIns
option forpreset-env
Add to
./storybook/main
:Workaround 2
Use ts-loader(i am already have it in webpack rules), just was need it to patch config of
managerWebpack
./storybook/main.js
:Workaround 3
core-js
to./subrepo1
devDependenciesMove languages.ts to
./subrepo1
folderWorkaround 4
core-js
to./subrepo2
devDependenciesBut it not obvious for developers why this package should have
core-js
dependencyAs i understand
useBuiltIns: usage
option for force babel to load imports from closest node_modules folderhttps://babeljs.io/docs/en/babel-preset-env#usebuiltins
This means core-js will be resolved relative to the file itself and needs to be accessible.
System
Similar issue is #12479
The text was updated successfully, but these errors were encountered: