forked from Instrument/query-it
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
62 lines (57 loc) · 1.23 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
55
56
57
58
59
var CopyWebpackPlugin = require('copy-webpack-plugin');
var path = require('path');
module.exports = {
cache: false,
entry: './src/scripts/app.js',
output: {
filename: 'main.js',
publicPath: '/',
path: __dirname + '/serve',
},
devServer: {
publicPath: '/',
contentBase: "./serve",
},
devtool: "#inline-source-map",
module: {
loaders: [{
test: /\.(js)$/,
exclude: /node_modules/,
loader: 'babel',
query: {
presets: ["es2015", "stage-0"],
plugins: ["transform-decorators-legacy"]
}
},
{
test:/\.json$/,
loader: "json-loader",
},
{
test: /\.(png|wav)$/,
loaders: ["file-loader"]
}, {
test: /\.(sass|scss)$/,
loader: 'style!css!sass'
}
]
},
resolve: {
modulesDirectories: ['node_modules', 'src'],
extensions: ['', '.js'],
root: [
path.resolve('..'),
],
modulesDirectories: [
'node_modules'
]
},
plugins: [
new CopyWebpackPlugin([
// Copy directory contents to {output}/to/directory/
{ from: 'src/viz', to: 'viz' },
{ from: 'src/data', to: 'data' },
{ from: 'src/index.html', to: 'index.html' },
])
]
};