forked from skarab42/lw.canvas-filters
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
37 lines (33 loc) · 819 Bytes
/
webpack.config.js
File metadata and controls
37 lines (33 loc) · 819 Bytes
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
let path = require('path')
let min = process.argv.indexOf('-p') !== -1
let output_library = "CanvasFilter"
let output_filename = "lw.canvas-filters" + (min ? ".min" : "") + ".js"
let src_path = path.resolve('./src')
let dist_path = path.resolve('./dist')
module.exports = {
debug: true,
context: src_path,
devtool: "source-map",
entry: [
"./canvas-filters.js"
],
output: {
path: dist_path,
filename: output_filename,
library: output_library,
libraryTarget: "umd",
umdNamedDefine: true
},
module: {
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loaders: ["babel-loader"]
}
]
},
devServer: {
contentBase: dist_path
}
};