Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

[4.0.0-beta.0] hangs when using webpack 4 #743

Closed
s524797336 opened this issue Mar 6, 2018 · 6 comments
Closed

[4.0.0-beta.0] hangs when using webpack 4 #743

s524797336 opened this issue Mar 6, 2018 · 6 comments

Comments

@s524797336
Copy link

It hangs even without any css-loader, when i remove ExtractTextPlugin, every thing is ok, when i say hangs it means forever hangs cause i wait all day, and it leave a node process and use cpu 100% when i ctrl+c the process

I need help to how to debug this

@lynxtaa
Copy link

lynxtaa commented Mar 6, 2018

Have the same problem. I think it has something to do with shared code between dynamicaly imported chunks.

With "--progress" enabled, it hangs on module and chunk tree optimization ExtractTextPlugin (even with all css files removed from project)

@lpillonel
Copy link

I also experience a similar issue with this version and [email protected] :

0ms recording
 91% additional asset processing ExtractTextPlugin/data/dms-frontapp/node_modules/webpack/lib/optimize/ConcatenatedModule.js:114
	switch (info.type) {
	             ^

TypeError: Cannot read property 'type' of undefined
    at getFinalName (/data/dms-frontapp/node_modules/webpack/lib/optimize/ConcatenatedModule.js:114:15)
    at ConcatenatedModule.source (/data/dms-frontapp/node_modules/webpack/lib/optimize/ConcatenatedModule.js:953:25)
    at Function.renderExtractedChunk (/data/dms-frontapp/node_modules/extract-text-webpack-plugin/dist/index.js:115:38)
    at ExtractTextPlugin.extractedChunks.forEach.extractedChunk (/data/dms-frontapp/node_modules/extract-text-webpack-plugin/dist/index.js:313:46)
    at Array.forEach (<anonymous>)
    ....

If I turn optimization.concatenateModules to false it is working fine. I don't know if the two issues are related.

@s524797336
Copy link
Author

s524797336 commented Mar 8, 2018

I have fixed the problem, in my router file, component is imported as webpack dynamic import like this
router.js

export const homePath = '/'
export const router = [{
   path: homePath,
   component: loadable(() => import('xxx'))
}]

And some where in the component xxx, because i need get path homePath for link, so i include router.js to get it. so some how it's a loop in webpack 4 but webpack 3

@iMarv
Copy link

iMarv commented Mar 9, 2018

+1 having the same issue

@dongtianee
Copy link

+1

@michael-ciniawsky
Copy link
Member

TL;DR Use mini-css-extract-plugin instead :)

The webpack >= v4.0.0 'support' for extract-text-webpack-plugin was moved to mini-css-extract-plugin as more lightweight approach for webpack >= v4.0.0 and ETWP entered maintenance mode. We are sorry for the inconvenience here, but ETWP reached a point where maintaining it become too much of a burden and it's not the first time upgrading a major webpack version was complicated and cumbersome due to issues with ETWP. The mid-term plan is integrate CSS support directly into webpack to avoid this kind of issue in the future

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

6 participants