-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathwebpack.config.js
33 lines (31 loc) · 925 Bytes
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
const path = require('path');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
output: {
libraryTarget: 'commonjs2', // necessary for the babel plugin
path: path.join(__dirname, 'dist'), // where to place webpack files
},
module: {
loaders: [
{
test: /\.scss$/,
loader: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: ['css-loader', 'sass-loader'],
}),
},
{
test: /\.css$/,
loader: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: ['css-loader'],
}),
},
],
},
plugins: [
new ExtractTextPlugin({
filename: `${path.parse(process.argv[2]).name}.css`,
}),
],
};