-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
69 lines (66 loc) · 2.18 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
60
61
62
63
64
65
66
67
68
69
var HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
devtool: 'source-map',
entry: {
'index': [
'babel-polyfill',
'reflect-metadata',
'expose?Zone!zone.js',
'./src/util/polyfills.es6.js',
'./src/index.es6.js'
]
},
output: {
path: './dist',
filename: '[name].js',
sourceMapFilename: '[file].map'
},
module: {
loaders: [
{
test: /\.es6\.js$/,
loader: 'babel',
query: {
cacheDirectory: true,
presets: [
'es2015',
'stage-0'
],
plugins: [
'angular2-annotations',
'transform-decorators-legacy',
'transform-class-properties',
'transform-flow-strip-types'
]
}
},
{ test: /\.json$/, loader: 'json' },
{ test: /\.css$/, loader: 'style!css!autoprefixer' },
{ test: /\.scss$/, loader: 'style!css!autoprefixer!sass' },
{ test: /\.png$/, loader: 'url' },
{ test: /^jquery$/, loader: 'expose?$!expose?jQuery' },
/* inject jQuery for libraries that need it */
{ test: /golden-layout$/, loader: 'imports?jQuery=jquery' },
{ test: /jquery-powertip$/, loader: 'imports?jQuery=jquery' },
{ test: /jquery\.balancetext\.js$/, loader: 'imports?jQuery=jquery' },
{ test: /bootstrap-sass\/assets\/javascripts\//, loader: 'imports?jQuery=jquery' },
/* bootstrap specific stuff */
{ test: /\.woff(\?v=\d+\.\d+\.\d+)?$/, loader: 'url?limit=10000&minetype=application/font-woff' },
{ test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/, loader: 'url?limit=10000&minetype=application/font-woff' },
{ test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, loader: 'url?limit=10000&minetype=application/octet-stream' },
{ test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, loader: 'file' },
{ test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, loader: 'url?limit=10000&minetype=image/svg+xml' }
]
},
sassLoader: {
// https://github.com/twbs/bootstrap-sass/issues/409
// https://github.com/sass/node-sass#precision
precision: 10
},
plugins: [
new HtmlWebpackPlugin({
title: "Graph Editor",
filename: 'index.html'
})
]
};