-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
54 lines (49 loc) · 1.49 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/**
* Copyright 2014, Yahoo! Inc.
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
*/
'use strict';
var webpack = require('webpack'),
ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
entry: './client.js',
output: {
path: __dirname + '/build/js',
filename: 'bundle.js'
},
module: {
loaders: [{
test: /\.jsx$/,
loader: 'jsx-loader'
},
// {
// test: /\.scss/,
// loader: 'style-loader!css-loader!sass-loader'
// },
// use ! to chain loaders
// {
// test: /\.css$/,
// loader: 'style-loader!css-loader'
// }, {
// test: /\.(png|jpg)$/,
// loader: 'url-loader?limit=8192'
// } // inline base64 URLs for <=8k images, direct URLs for the rest
{
test: /\.css$/,
loader: ExtractTextPlugin.extract("style-loader", 'css-loader')
}, {
test: /\.scss$/,
loader: ExtractTextPlugin.extract("style-loader", 'css-loader!sass-loader?outputStyle=expanded')
}
]
},
plugins: [
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
new ExtractTextPlugin("style.css", {
allChunks: true
})
],
resolve: {
extensions: ['', '.js', '.jsx']
}
};