Last active
January 29, 2018 07:43
-
-
Save bazuzu931/66ff90cbf096e1e86f8b1445b64299bb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
| module.exports = function(paths) { | |
| return { | |
| module: { | |
| rules: [ | |
| { | |
| test: /\.scss$/, | |
| include: paths, | |
| use: ExtractTextPlugin.extract({ | |
| publicPath: '../', | |
| fallback: 'style-loader', | |
| use: ['css-loader', 'sass-loader'] | |
| }) | |
| }, | |
| { | |
| test: /\.css$/, | |
| include: paths, | |
| use: ExtractTextPlugin.extract({ | |
| publicPath: '../', | |
| fallback: 'style-loader', | |
| use: ['css-loader'] | |
| }) | |
| } | |
| ] | |
| }, | |
| plugins: [ | |
| new ExtractTextPlugin('css/[name].css') | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment