webpack hangs at on “95% emit” / “95% emitting”

前端 未结 11 2008
不思量自难忘°
不思量自难忘° 2021-02-05 14:52

This is my production webpack config. The two quotes in the title refer to webpack2 and webpack respectively. Both hang for me with a similar error.

This is my command t

11条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-05 15:19

    In my case I was trying to use Angular 4, Webpack 3, AOT and lazy loading.
    Using @ngtools/webpack and AotPlugin made it freeze at 95%.

    What fixed was:
    1). Install node-sass with npm install node-sass --no-bin-links, because it was not installed automatically with sass-loader.
    2). Adding these loaders for the SCSS/CSS files (even inside node modules):

            {
                test: /\.css$/,
                use: [
                    'style-loader',
                    'css-loader'
                ]
            },
            {
                test: /\.scss$/,
                use: [
                    'raw-loader',
                    'sass-loader'
                ]
            }
    

提交回复
热议问题