You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had an issue with building Bootstrap with Webpack where, after following the Getting Started guide, I was seeing the following error:
ERROR in ./node_modules/bootstrap/dist/js/bootstrap.js Module build failed: ReferenceError: Unknown plugin "transform-es2015-modules-strip" specified in "/home/laptop/webpack-test/node_modules/bootstrap/.babelrc" at 0, attempted to resolve relative to "/home/laptop/webpack-test/node_modules/bootstrap"
However this package does seem to be specified as a dev dependency in the Bootstrap package.json.
To resolve it I had to manually install the plugin in my project, e.g:
Is the babel loader in your webpack config excluding node_modules? Bootstrap publishes it's .babelrc file so I suspect babel loader is parsing all of your dependencies and using any .babelrc files it comes across.
I wasn't excluding node_modules.
I removed the babel-plugin-transform-es2015-modules-strip package from my project, retried with the exclusion in place and everything works as it should.
Thanks for your help!
Is this a convention that folks would normally know to follow, or is it worth adding to the docs?
Hi,
I had an issue with building Bootstrap with Webpack where, after following the Getting Started guide, I was seeing the following error:
ERROR in ./node_modules/bootstrap/dist/js/bootstrap.js Module build failed: ReferenceError: Unknown plugin "transform-es2015-modules-strip" specified in "/home/laptop/webpack-test/node_modules/bootstrap/.babelrc" at 0, attempted to resolve relative to "/home/laptop/webpack-test/node_modules/bootstrap"
However this package does seem to be specified as a dev dependency in the Bootstrap package.json.
To resolve it I had to manually install the plugin in my project, e.g:
npm install babel-plugin-transform-es2015-modules-strip --save-dev
Hopefully this will save others some time, or someone more proficient with npm than me will be able to see what the issue is.
Thanks!
The text was updated successfully, but these errors were encountered: