bughelp wanted
説明
Hi, the prerender-loader works fine for me except when it comes to css.
In my index.js:
import './style.scss
But when I run the build I get this error:
ERROR in ./web-assets/scss/style.scss Module build failed: Error: "extract-text-webpack-plugin" loader is used without the corresponding plugin, refer to https://github.com/webpack/extract-text-webpack-plugin for the usage example
webpack.prod.config:
output: {
filename: "[name]-[chunkhash].js",
chunkFilename: "[id].[chunkhash].bundle.js",
publicPath: '/static/dist/',
path: __dirname + "/dist"
},
plugins: [
new webpack.optimize.UglifyJsPlugin(),
new webpack.LoaderOptionsPlugin({ minimize: true }),
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
new HtmlWebpackPlugin({
filename: 'index.html',
template: '!!prerender-loader?string!index.html',
}),
new ExtractTextPlugin("[name]-[chunkhash].css"),
],
module: {
rules: [
{
test: /\.css$/,
use: ExtractTextPlugin.extract({
fallback: "style-loader",
loader: "css-loader"
})
},
{
test: /\.scss/,
use: ExtractTextPlugin.extract({
fallback: "style-loader",
loader: [
{
loader: 'css-loader',
options: {
sourceMap: true
}
},
{
loader: 'sass-loader',
options: {
sourceMap: true
}
}
]
})
},
]
}