forked from juliancwirko/react-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.test.config.js
32 lines (31 loc) · 924 Bytes
/
webpack.test.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
var path = require('path');
var sGrid = require('s-grid');
var rupture = require('rupture');
var autoprefixer = require('autoprefixer');
module.exports = {
output: {
// YOU NEED TO SET libraryTarget: 'commonjs2'
libraryTarget: 'commonjs2',
},
module: {
loaders: [{
test: /\.styl$/,
exclude: /(node_modules|bower_components)/,
loader: 'style!css?sourceMap&modules&importLoaders=1&localIdentName=[name]__[local]__[hash:base64:5]!postcss!stylus-loader'
}, {
test: /\.(png|jpg)$/,
exclude: /(node_modules|bower_components)/,
loader: 'url-loader?name=images/[name].[ext]&limit=8192'
}],
},
resolve: {
root: path.join(__dirname, '..', 'app'),
extensions: ['', '.js', '.jsx', '.json', '.css', '.styl', '.png', '.jpg', '.jpeg', '.gif']
},
stylus: function () {
return [sGrid, rupture]
},
postcss: function () {
return [autoprefixer];
}
};