-
Notifications
You must be signed in to change notification settings - Fork 11
/
webpack-test.config.js
40 lines (38 loc) · 937 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
33
34
35
36
37
38
39
40
var path = require('path');
var webpack = require('webpack');
var loaders = require("./webpack-loaders");
var ExtractTextPlugin = require("extract-text-webpack-plugin");
var PATHS = {
app: path.join(__dirname, 'src/index.dev.ts'),
build: path.join(__dirname, 'builds'),
dist: path.join(__dirname, 'dist')
};
module.exports = {
entry: [PATHS.app],
output: {
filename: 'build.js',
path: 'tmp'
},
resolve: {
root: __dirname,
extensions: ['', '.ts', '.js', '.json', '.scss']
},
resolveLoader: {
modulesDirectories: ["node_modules"]
},
devtool: "source-map-inline",
module: {
loaders: loaders,
postLoaders: [
{
test: /^((?!\.spec\.ts).)*.ts$/,
exclude: /(node_modules|bower_components)/,
loader: 'istanbul-instrumenter'
}
]
},
plugins: [
new webpack.optimize.DedupePlugin(),
new ExtractTextPlugin("app.css", { allChunks: true })
]
};