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.

No scope hoisting after migration to webpack 3 ModuleConcatenationPlugin

See original GitHub issue

I have migrated a project from webpack 2 to webpack 3 and added ModuleConcatenationPlugin. Yet I see absolutely no change in the dist.

You can compare 2 versions by checking out master https://github.com/cssinjs/jss and https://github.com/cssinjs/jss/tree/webpack3 branches and then running npm run build in each, which will produce dist/jss.js file.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
sokracommented, Dec 28, 2017

Yep. Send a PR.

0reactions
jrenczcommented, Dec 28, 2017

You didn’t allow webpack to handle ESM because you use the es2015 babel preset without modules: false flag.

@sokra I think it should be mentioned in plugin documentation on https://webpack.js.org/plugins/module-concatenation-plugin/

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack 3 no scope hoisting and no fallback output with
When the migration is complete, you will access your Teams at stackoverflowteams.com, and they will no longer appear in the left sidebar on ......
Read more >
ModuleConcatenationPlugin - webpack
This concatenation behavior is called “scope hoisting.” Scope hoisting is specifically a feature made possible by ECMAScript Module syntax. Because of this ...
Read more >
Brief introduction to scope hoisting in Webpack - Medium
On its third major release, Webpack introduced a new feature: scope hoisting. Many developers are already exposing data showing great ...
Read more >
Migrating from Webpack 3 to 4 - AppOptics Blog
After hearing lots of stories about the large performance ... Also known as “scope hoisting,” the ModuleConcatenationPlugin is now on by ...
Read more >
Migrating from webpack 3 to 4 - Adam Jahnke
splitChunks option can be found here. Get rid of ModuleConcatenationPlugin. Also known as "scope hoisting". It is now on by default in ...
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