私はSASSのコンパイルが私の+ WebPACKのプロジェクトを反応させ、このエラーに実行し続ける上で実行して取得しようとしている:抽出プラグイン「ローダーは、対応するプラグインなしで使用される」テキスト - 反応して、サス、WebPACKの
Module build failed: Error: "extract-text-webpack-plugin" loader is used without the corresponding plugin
このチュートリアルのガイドラインに従っ:ここLink
は私のwebpack.config.js
任意の提案ですか?
const debug = process.env.NODE_ENV !== "production";
const webpack = require('webpack');
const path = require('path');
const ExtractTextPlugin = require("extract-text-webpack-plugin");
module.exports = {
context: path.join(__dirname, "src"),
devtool: debug ? "inline-sourcemap" : null,
entry: "./js/client.js",
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel-loader',
query: {
presets: ['react', 'es2015', 'stage-0'],
plugins: ['react-html-attrs', 'transform-class-properties', 'transform-decorators-legacy'],
}
},
{
test: /\.scss$/,
loader: ExtractTextPlugin.extract('css!sass')
}
]
},
output: {
path: __dirname + "/src/",
filename: "client.min.js"
},
plugins: debug ? [] : [
new ExtractTextPlugin('dist/styles/main.css', {
allChunks: true
}),
new webpack.optimize.DedupePlugin(),
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.optimize.UglifyJsPlugin({ mangle: false, sourcemap: false }),
],
};
@Micahel Jungo - これで解決しましたが、私のお尻はmain.cssシートにコンパイルされていませんか? – Filth
'ExtractTextPlugin'がなければ、CSSファイルは作成されませんが、JSバンドルに含まれています。だからまだ抽出したいのであれば、開発にもプラグインを使う必要があります。 –
申し訳ありません私はちょっと混乱しています...これはデバッグ状態の周りにあるようです。それを削除する方が良いですか?私はこのwebpack.configファイルを実行して、1つの.cssシートにコンパイルするのはどうなのでしょうか? – Filth