-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack.test.config.js
More file actions
executable file
·38 lines (37 loc) · 972 Bytes
/
webpack.test.config.js
File metadata and controls
executable file
·38 lines (37 loc) · 972 Bytes
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
var path = require('path'); // eslint-disable-line no-var
var ExtractTextPlugin = require('extract-text-webpack-plugin'); // eslint-disable-line no-var
const loaderString = [
'css?minimize&modules&localIdentName=[hash:base64:4]',
'postcss-loader?parser=postcss-scss',
"sass-loader"
].join('!')
module.exports = {
output: {
// for babel plugin
libraryTarget: 'commonjs2',
// where to place webpack files
path: path.join(__dirname, './build/'),
// for url-loader if limit exceeded to set publicPath
publicPath: '',
},
module: {
loaders: [
{
test: /\.(png|jpg|jpeg|gif|svg|woff|woff2|eot|ttf)$/,
loader: 'url-loader?limit=1000',
},
{
test: /.json$/,
loader: "json-loader"
},
{
test: /\.scss?$/,
exclude: /node_modules/,
loader: ExtractTextPlugin.extract(loaderString)
}
]
},
"plugins": [
new ExtractTextPlugin('style.css')
]
};