-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.config.js
45 lines (44 loc) · 967 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
const webpack = require('webpack');
const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
entry: './js/app.js',
output: {
path: __dirname + '/docs',
filename: 'bundle.min.js'
},
plugins: [
new CopyWebpackPlugin([
{ from: '*.html' },
{ from: '*.png' },
{ from: '*.jpg' },
{ from: './js/LZWEncoder.js' },
{ from: './js/NeuQuant.js' },
{ from: './js/GIFEncoder.js' },
{ from: './images/*.jpg' },
{ from: './images/*.png' },
{ from: './images/*.ico' },
{ from: './images/*.gif' },
{ from: './examples/*.gif' },
])
],
module: {
loaders: [{
test: /\.(s)*css$/,
loaders: [
'style-loader',
'css-loader',
'sass-loader'
]
}, {
test: /\.(jpg|png)$/,
loaders: [
'url-loader'
]
}, {
test: /\.js$/,
loaders: [
'babel-loader?presets[]=es2015'
]
}]
}
}