From d0997ed0c18de0f17ea2f9435558f88e3f0fdd1c Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Sun, 9 Oct 2016 18:08:46 +0800 Subject: [PATCH] Config TextExtract plugin and change build folder --- public/views/foot.ejs | 2 +- public/views/head.ejs | 1 + webpack.config.js | 9 +++++---- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/public/views/foot.ejs b/public/views/foot.ejs index 0ad105461..7df96b58a 100644 --- a/public/views/foot.ejs +++ b/public/views/foot.ejs @@ -31,7 +31,7 @@ - + diff --git a/public/views/head.ejs b/public/views/head.ejs index 6890ddf36..2aa856899 100644 --- a/public/views/head.ejs +++ b/public/views/head.ejs @@ -36,6 +36,7 @@ + diff --git a/webpack.config.js b/webpack.config.js index cad356fb6..8fce2653d 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -20,7 +20,8 @@ module.exports = { }), new webpack.DefinePlugin({ "require.specified": "require.resolve" - }) + }), + new ExtractTextPlugin("[name].css") ], entry: { @@ -28,7 +29,7 @@ module.exports = { }, output: { - path: path.join(__dirname, 'public/build/js'), + path: path.join(__dirname, 'public/build'), filename: '[name].js' }, @@ -49,10 +50,10 @@ module.exports = { loader: 'json-loader' }, { test: /\.css$/, - loader: 'style-loader!css-loader' + loader: ExtractTextPlugin.extract('style-loader', 'css-loader') }, , { test: /\.scss$/, - loaders: ['style', 'css', 'sass'] + loader: ExtractTextPlugin.extract('style-loader', 'sass-loader') }, { test: require.resolve("js-sequence-diagrams"), loader: "imports?Raphael=raphael"