question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rollup preset (in .babelrc) crashes Webpack builds

See original GitHub issue

Thanks 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:closed
  • Created 7 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
callmecavscommented, Dec 9, 2016

@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.

0reactions
callmecavscommented, Jan 9, 2017

@MilllerTime no problemo, thanks for confirming the fix. sorry it took me forever.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found