-
Notifications
You must be signed in to change notification settings - Fork 2
/
webpack.test.config.js
60 lines (52 loc) · 1.17 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
'use strict';
// Modules
var webpack = require('webpack');
var path = require('path');
var config = {
entry : {},
devtool : 'inline-source-map',
resolve : {
root: [path.resolve(__dirname, 'lib'), path.resolve(__dirname, 'node_modules')],
extensions: ['', '.js', '.json', '.scss']
},
module : {
preLoaders: [{
test: /\.js$/,
exclude: [
/node_modules/,
/\.spec\.js$/
],
loader: 'isparta-loader'
}],
loaders: [{
test: /\.json$/,
exclude: /node_modules/,
loaders: ["raw-loader"]
},{
test: /\.html$/,
exclude: /node_modules/,
loader: 'ngtemplate!html'
},{
test: /\.(jpe?g|gif|png|svg|woff|woff2|ttf|eot|wav|mp3)$/,
loader: 'file' // inline base64 URLs for <=10kb images, direct URLs for the rest
},{
test: /\.less$/,
exclude: /node_modules/,
loaders: ['style', 'css', 'less?sourceMap', 'resolve-url']
},{
test: /\.scss$|\.css$/,
exclude: /node_modules/,
loaders: ['style', 'css-loader', 'resolve-url', 'sass?sourceMap']
},{
test: /\.js$/,
exclude: /node_modules/,
loaders: ['babel']
}]
},
plugins : [],
devServer : {
contentBase: './lib/img',
stats: 'minimal'
},
};
module.exports = config;