Upgrade to @babel/preset-env 7.4.4 with core-js@3.x is breaking build
See original GitHub issueDescribe the bug
With @babel/preset-env v7.4.3 and using core-js
3.x explicitly in babel config building storybook worked fine. After upgrading @babel/preset-env to the latest release (being 7.4.4) an error is shown when core-js
modules are used.
To Reproduce Steps to reproduce the behavior:
- Create a babel config with
corejs: { version: 3, proposals: true }
- Use latest @babel/preset-env v7.4.4
- build and start storybook
- See errors like
Module not found: Error: Can't resolve 'core-js/modules/web.dom-collections.iterator' in ...
Module not found: Error: Can't resolve 'core-js/modules/es.array.concat' in ...
Expected behavior A storybook build should not fail with latest babel, when doing a bugfix version bump.
System:
- OS: MacOS 10.14.4 (18E226)
- Framework: react
- Version: 5.0.11
Additional context May be this is also related to https://github.com/storybooks/storybook/issues/6204 but the workaround is not working and wasn’t needed with @babel/preset-env v7.4.3.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:9 (5 by maintainers)
Top Results From Across the Web
babel/preset-env
babel /preset-env` is a smart preset that allows you to use the latest JavaScript without needing to micromanage which syntax transforms (and optionally, ......
Read more >Updating to Babel 7.4 - The Basement
Since the release of Babel 7.4 there are some breaking changes to the way the polyfilling works. Let's have a look. Update Babel....
Read more >@babel/preset-env | Yarn - Package Manager
Important: This documentation covers modern versions of Yarn. For 1.x docs, see classic.yarnpkg.com. Yarn.
Read more >babel/parser - NPM Package Versions - Socket.dev
Start using Socket to analyze @babel/parser and its 0 dependencies to secure your app ... babel-preset-env , babel-runtime-corejs2 , babel-runtime-corejs3 ...
Read more >@nuxt/babel-preset-app-edge - npm
Furthermore the preset is adding polyfills. Note: Since core-js@2 and core-js@3 are both supported from Babel 7.4.0, we recommend ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is fixed for me, as well. Thanks!
Thanks @shilman, updating all my
@storybook
dependencies to@5.1.0-beta.1
fixed the build issues for me.