-
-
Notifications
You must be signed in to change notification settings - Fork 44
/
webpack.config.js
40 lines (38 loc) · 1.1 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
var path = require('path');
var webpack = require('webpack');
var PACKAGE = require('./package.json');
var banner = '\n ' + PACKAGE.name + ' - v' + PACKAGE.version + ' (' + PACKAGE.homepage +') ' +
'\n ' + PACKAGE.description + '\n ' +
'\n ' + PACKAGE.license +
'\n (c) ' + new Date().getFullYear() + ' ' + PACKAGE.author + '\n';
var pluginFiles = [
'./src/leaflet.motion.js',
'./src/leaflet.motion.utils.js',
'./src/leaflet.motion.easing.js',
'./src/layer/leaflet.motion.polyline.js',
'./src/layer/leaflet.motion.polygon.js',
'./src/layer/leaflet.motion.group.js',
'./src/layer/leaflet.motion.seq.js'
];
module.exports = [
{
mode: "development",
entry: {
"leaflet.motion": pluginFiles,
},
output: { filename: '[name].js', path: path.resolve(__dirname, 'dist') },
plugins: [
new webpack.BannerPlugin(banner)
]
},
{
mode: "production",
entry: {
"leaflet.motion.min": pluginFiles,
},
output: { filename: '[name].js', path: path.resolve(__dirname, 'dist') },
plugins: [
new webpack.BannerPlugin(banner)
]
}
];