build "module.exports = (__webpack_require__(73))(48)" code into css fle #762
Comments
me too, extract-text-webpack-plugin 完成了它的任务, webpack4推荐mini-css-extract-plugin |
me too, webpack 4.5.0. |
Same issue here. |
I write the demo with wepback4.5 + mini-css-extract-plugin,look this repos:webpack4 demo const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const UglifyJsPlugin = require("uglifyjs-webpack-plugin");
const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin");
optimization: {
runtimeChunk: {
name: 'manifest'
},
minimizer: [
new UglifyJsPlugin({
cache: true,
parallel: true,
sourceMap: true, // set to true if you want JS source maps,
uglifyOptions: {
warnings: false
}
}),
new OptimizeCSSAssetsPlugin({})
],
splitChunks:{
chunks: 'async',
minSize: 30000,
minChunks: 1,
maxAsyncRequests: 5,
maxInitialRequests: 3,
name: false,
cacheGroups: {
vendor: {
name: 'vendor',
chunks: 'initial',
priority: -10,
reuseExistingChunk: false,
test: /node_modules\/(.*)\.js/
},
styles: {
name: 'styles',
test: /\.(scss|css)$/,
chunks: 'all',
minChunks: 1,
reuseExistingChunk: true,
enforce: true
}
}
}
},
module: {
rules: [
{
test: /\.scss|css$/i,
use: [
MiniCssExtractPlugin.loader,
"css-loader",
"postcss-loader?sourceMap",
"resolve-url-loader",
"sass-loader?sourceMap"
]
}
]
} |
Same issue here. What a Wild West Webpack 4.x is... |
I just hit this issue as well. In the output CSS I'm seeing the following:
|
For what it’s worth I ended up going with |
用了你的配置 这里报错是为什么ERROR in ./src/routes/Home/App.less |
DEPRECATED |
when use extract-text-webpack-plugin@4.0.0-beta.0 with webpackv4.1.1, the options set
willl build "module.exports = (webpack_require(73))(48)" code into the css file.
The text was updated successfully, but these errors were encountered: