-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
45 lines (43 loc) · 984 Bytes
/
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
/*
* SVG Interpolator
* Takes an SVG as input and generates an array of evently spaced points marking
* the boundary and fill of the paths.
*
* Copyright (C) 2016 Tutive Ltd.
*/
var webpack = require('webpack'),
path = require('path'),
HTMLWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: {
'svg-interp': './index',
demo: './demo/demo'
},
output: {
path: path.resolve('./build'),
filename: '[name].js'
},
module: {
loaders: [
{test: /\.js$/, loader: 'babel', query: {presets: ['es2015']}},
{test: /\.svg$/, loader: 'svgcmd-loader'}
]
},
resolve: {
root: [
path.resolve('./'),
path.resolve('./src')
]
},
plugins: [
new webpack.optimize.UglifyJsPlugin(),
new HTMLWebpackPlugin({
template: './demo/index.html',
inject: false
})
],
devtool: 'source-map',
devServer: {
contentBase: path.resolve('./build')
}
};