Skip to content
This repository has been archived by the owner on Mar 16, 2020. It is now read-only.

Babel 7 Support #83

Open
drwpow opened this issue Sep 4, 2018 · 13 comments
Open

Babel 7 Support #83

drwpow opened this issue Sep 4, 2018 · 13 comments

Comments

@drwpow
Copy link

drwpow commented Sep 4, 2018

This plugin still depends on babel-core 6.23. Any possibility of updating to @babel/core instead?

@alexander-akait
Copy link
Member

@DangoDev please wait new release (will be in near future)

@indeyets
Copy link

indeyets commented Nov 2, 2018

@evilebottnawi any news?

@wangqs1990
Copy link

option babel and minifyPreset help me

new MinifyPlugin({ builtIns: false }, {
    babel: require('@babel/core'),
    minifyPreset: require('babel-preset-minify')
})

@hershmire
Copy link

Does this plugin still not support Babel 7?

@ztyzbb
Copy link

ztyzbb commented Jan 29, 2019

@hershmire wangqs1990‘s solution works well.

@bvibber
Copy link

bvibber commented Feb 4, 2019

I'm not so sure this is stable with babel 7.2.2 and webpack 4.29... Using the above workaround I get:

    ERROR in Cannot read property 'isPure' of null

If I add to the plugin options removeUndefined: false it works around that, but then something else fails:

    ERROR in Cannot read property 'getBinding' of null

@alexander-akait
Copy link
Member

Sorry, don't have time on this right now, my todo list is very big 😞

@gknapp
Copy link

gknapp commented Mar 18, 2019

I'm seeing:

ERROR in Couldn't find intersection

ERROR in Couldn't find intersection

ERROR in Couldn't find intersection

ERROR in Couldn't find intersection

ERROR in Couldn't find intersection

ERROR in Couldn't find intersection

ERROR in Couldn't find intersection

ERROR in don't know how to turn this value into a node

config:

new MinifyPlugin({}, {
  babel: require("@babel/core"),
  minifyPreset: require("babel-preset-minify")
})

I've tried a variation, copying @wangqs1990 suggestion, same result:

new MinifyPlugin({
  builtIns: false,
  mangle: { topLevel: true }
}, {
  babel: require("@babel/core"),
  minifyPreset: require("babel-preset-minify")
})

@jsauca
Copy link

jsauca commented Apr 1, 2019

Hi @gknapp,

I am experiencing the exact same isssues as you with Webpack 4.29.6 and Babel 7.
Have you found any fixes or any ways to bypass those errors messages ?

@gknapp
Copy link

gknapp commented Apr 16, 2019

@jsauca I aborted switching to this plugin for minification and returned to uglifyjs-webpack-plugin.

I read this plugin produced better minified code but couldn't get it to work. Chrome inspector's coverage reports drove me to try and seek smaller build sizes - it appears to be somewhat common for reactjs based web app to only have ~50% code coverage / usage.

I've read including node_modules in production build configs could eliminate a lot of dead / unused code.

@liringlas
Copy link

liringlas commented Apr 21, 2019

Looks like I have kind of similar issue as @gknapp has, breaks on adding @babel/core as custom 'babel' field value.

ERROR in Cannot read property 'isPure' of null
ERROR in Cannot read property 'isProgram' of null

"webpack": "^4.29.6" , "@babel/core": "^7.4.3"

@gknapp
Copy link

gknapp commented Apr 23, 2019

I tried this and other various tweaks to try and eliminate any unused code. I already had webpack in production mode, I found no difference in bundle size by including node_modules.

I've read including node_modules in production build configs could eliminate a lot of dead / unused code.

@Haraldson
Copy link

I would like to re-enable this plugin, but whenever I do, and try to build, the build process just gets stuck in limbo without any output. Is this issue being worked on?

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

No branches or pull requests