diff options
author | Noah Loomans <noahloomans@gmail.com> | 2017-12-10 11:37:32 +0100 |
---|---|---|
committer | Noah Loomans <noahloomans@gmail.com> | 2017-12-10 11:37:32 +0100 |
commit | edaa91d05e753e3609c00068f565b88c4ef77e62 (patch) | |
tree | ac1d4d9588b3cc6de98baf7942efddb235e1cedf /webpack.config.js | |
parent | 1286c6556115f80218a4828d29b288f56b3d795f (diff) |
Compile scss to css
Diffstat (limited to 'webpack.config.js')
-rw-r--r-- | webpack.config.js | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/webpack.config.js b/webpack.config.js index 482f8db..6db6543 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,6 +1,7 @@ const path = require('path'); +const ExtractTextPlugin = require('extract-text-webpack-plugin'); -module.exports = { +const js = { entry: './src/client/react/index.jsx', output: { path: path.resolve(__dirname, 'src/client/static'), @@ -18,5 +19,27 @@ module.exports = { }, resolve: { extensions: ['.js', '.jsx'], - } + }, +}; + +const style = { + entry: './src/client/style/index.scss', + output: { + path: path.resolve(__dirname, 'src/client/static'), + filename: 'bundle.css', + }, + module: { + rules: [ + { + test: [/\.scss$/], + exclude: [/node_modules/], + loader: ExtractTextPlugin.extract(['css-loader', 'sass-loader']), + }, + ], + }, + plugins: [ + new ExtractTextPlugin('bundle.css'), + ], }; + +module.exports = [js, style]; |