Rollup preset (in .babelrc) crashes Webpack builds
See original GitHub issueThanks for the elegant library! It does a wonderful job.
One issue: I can’t bundle the jump.js module as-is. I’m using webpack and babel, and getting the following error:
ERROR in ./~/jump.js/src/jump.js
Module build failed: Error: Couldn't find preset "es2015-rollup" relative to directory
"...\\node_modules\\jump.js"
The issue seems to be that my instance of babel sees your .babelrc
file and tries to bundle your code using the rollup preset, which I don’t have installed. If I delete your .babelrc
, it compiles flawlessly.
Any chance the babel config could be inlined in the .gulpfile
so it only applies to isolated builds of jump.js? Or perhaps there is a better method of handling this sorta thing - I’m no pro when it comes to open-source bundler-agnostic transpiled npm modules.
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
trying to build rollup + babel + react starter, but get error during ...
I cloned your repo and it seems there are several things wrong with your setup. Typo in babel.config.js. Remove the extra comma.
Read more >Options - Babel.js
Primary options; Config Loading options; Plugin and Preset configuration; Config Merging options; Source Map options; Misc options; Code Generator options ...
Read more >Tree-shaking in real world: what could go wrong? - Medium
Let's write a simple rollup config and try to bundle our components.jsx into a tree-shakable ES module. We first need to npm install...
Read more >Converting a Webpack Build to Rollup - Ship Shape
We used eslint-loader with webpack, and passed all JS through it, excluding node_modules . We also had to make sure we ran it...
Read more >Create a JavaScript library using ES2015 modules, Gulp ...
Rollup is a module bundler for JavaScript which compiles small pieces ... npm install --save-dev babel-core gulp-babel babel-preset-es2015 ...
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
@MilllerTime @dbartel ill address this sooner rather than later - in the midst of reworking the build system of my projects to use webpack2 instead of rollup. Rollups treeshaking and scope collapsing will be coming to webpack2 soon - these differences were the reason I originally chose it over webpack.
Thank you both for your patience, and for hashing out a fix here and in the PR. will update and close this issue when I’ve made the changes.
@MilllerTime no problemo, thanks for confirming the fix. sorry it took me forever.