-
Notifications
You must be signed in to change notification settings - Fork 3
/
webpack.config.js
50 lines (48 loc) · 1.3 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
const webpack = require('webpack');
const path = require('path');
module.exports = {
entry: [
'./src/js/redraw.js',
'./src/js/tools/arrow/arrow-tool.js',
'./src/js/tools/arrow/arrow-setup.js',
'./src/js/tools/delete/delete-tool.js',
'./src/js/tools/delete/delete-setup.js',
'./src/js/tools/horizontalLine/horizontalLine-tool.js',
'./src/js/tools/horizontalLine/horizontalLine-setup.js',
'./src/js/tools/pixelate/pixelate-tool.js',
'./src/js/tools/pixelate/pixelate-setup.js',
'./src/js/tools/rectangle/rectangle-tool.js',
'./src/js/tools/rectangle/rectangle-setup.js',
'./src/js/tools/reset/reset-tool.js',
'./src/js/tools/reset/reset-setup.js',
'./src/js/tools/text/text-tool.js',
'./src/js/tools/text/text-setup.js' ],
output: {
path: __dirname,
filename: './dist/redraw.js'
},
plugins: [
new webpack.dependencies.LabeledModulesPlugin(),
new webpack.IgnorePlugin(/jsdom$/)
],
resolve: {
modulesDirectories: ['node_modules']
},
externals: {
fabric: 'fabric'
},
module: {
loaders: [
{
test: /\.css$/,
loader: 'style!css'
},
{
test: /\.js$/,
loader: 'babel',
exclude: /node_modules|bower_components/
},
{ test: /\.json$/, loader: 'json' }
]
}
};