-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathwebpack.config.js
44 lines (38 loc) · 1.14 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
const leapjsVersion = JSON.stringify(require('./node_modules/leapjs/package.json').version);
const version = JSON.stringify(require('./package.json').version);
const webpack = require('webpack');
const banner = `
reveal-leap-motion v${version}
https://github.com/gneatgeek/reveal-leap-motion
Copyright 2016 Rory Hardy, James Sun, and other contributors
Released under the Apache-2.0 license
https://github.com/gneatgeek/reveal-leap-motion/blob/master/LICENSE
===================================================================
LeapJS v${leapjsVersion}
http://github.com/leapmotion/leapjs/
Copyright 2013 LeapMotion, Inc. and other contributors
Released under the Apache-2.0 license
http://github.com/leapmotion/leapjs/blob/master/LICENSE.txt
`.trim().replace(/^ +|"/gm, '');
module.exports = {
entry: {
'reveal-leap-motion': './src',
},
mode: 'production',
module: {
rules: [
{
exclude: /node_modules/,
loader: 'babel-loader',
test: /\.js$/,
},
],
},
output: {
filename: '[name].min.js',
path: __dirname,
},
plugins: [
new webpack.BannerPlugin(banner),
],
};