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.

Publish Pre-Compile to ES5

See original GitHub issue

I was trying to npm run build in create-react-app and it failed to minify. create-react-app recommends compiling into ES5. Could you publish pre-compiled to npm?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:8
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
igrek8commented, Feb 10, 2018

@klappy

After digging an hour into the issue I found a quick fix

npm i --prefix ./node_modules/autobahn/node_modules/cbor babel-preset-env babel-polyfill --save-dev
/usr/local/bin/babel --presets env --plugins transform-runtime ./node_modules/autobahn/node_modules/cbor/lib --out-dir ./node_modules/autobahn/node_modules/cbor/lib.es5
mv ./node_modules/autobahn/node_modules/cbor/lib ./node_modules/autobahn/node_modules/cbor/lib.es6
mv ./node_modules/autobahn/node_modules/cbor/lib.es5 ./node_modules/autobahn/node_modules/cbor/lib
npm run build 
1reaction
klappycommented, Nov 28, 2017

I am running into this issue as well. If anybody is able to confirm a solution or workaround, please post.

Related to #57

Read more comments on GitHub >

github_iconTop Results From Across the Web

Please publish package precompiled to es5 #1609 - GitHub
hi I am using create-react-app and we use enzyme :-) However when we try to build it can't be minified, probably because the...
Read more >
Transpiling dynamic ES6 System.import to ES5 (amd or other)
How to publish a module written in ES6 to NPM? 1 · Simple Babel transpiled es6 Module Loading · 9 · Using SystemJS/jspm...
Read more >
Precompiling Your Website (C#) - Microsoft Learn
Automatic compilation requires that both the declarative markup and source code be present on the web server. This can be an unattractive option ......
Read more >
On Consuming (and Publishing) ES2015+ Packages - Babel.js
Our dependencies actually publish ES2015+ instead of the current baseline of ES5/ES3. The future baseline shouldn't be fixed at ES2015, ...
Read more >
Using ES2015 with Asset Pipeline on Ruby on Rails
There are several ways you can use to precompile your JavaScript code. Some people use Babel's CLI . Some people prefer builders like...
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