diff options
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];  | 
