Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a index.js5 #31

Closed
ComLock opened this issue Mar 7, 2017 · 2 comments
Closed

Provide a index.js5 #31

ComLock opened this issue Mar 7, 2017 · 2 comments

Comments

@ComLock
Copy link

ComLock commented Mar 7, 2017

So I love Ecmascript 2015, and the fact support for it is growing:
http://kangax.github.io/compat-table/es6/

Cool that node 4 supports it. 👍

However there are a lot of javascript out there not running on node 4.
For example I'm working with Enonic XP https://enonic.com/ (my employer) which is using http://purplejs.io/ which runs on Java JVMs Nashhorn

And it seems Nashhorn wont support ES2015 before JDK9
http://winterbe.com/posts/2014/04/05/java8-nashorn-tutorial/

So perhaps instead of removing ES2015, or renaming index.js to index.es6, could you provide a transpiled index.js5 file?

(Side note: My babel didn't transpile Number.isFinite, perhaps I must update babel or configure it)

Similar issues:

Remove es6
#26

UglifyJS can't parse pretty-bytes@4.0.0 without transpilation
#22

@sindresorhus
Copy link
Owner

I'm not interested in doing that, sorry. See: sindresorhus/ama#446 (comment)


(Side note: My babel didn't transpile Number.isFinite, perhaps I must update babel or configure it)

You also need babel-polyfill.

@htchaan
Copy link

htchaan commented Mar 21, 2017

Just exclude this module in your babel setup like:

module.exports = {
  entry: './src/js/index.jsx',
  output: {
    filename: './dist/js/index.js'
  },
  module: {
    loaders: [
      {
        test: /\.jsx?$/,
        exclude: /(node_modules|bower_components)\/(?!pretty-bytes\/).*/,
        loader: 'babel-loader',
...

webpack/webpack#2031 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants