forked from lusofonia/conjugador
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
38 lines (34 loc) · 926 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
'use strict';
const path = require('path');
const UglifyjsPlugin = require('uglifyjs-webpack-plugin');
const { BannerPlugin } = require('webpack');
const { version, license, author } = require('./package');
const banner = `Conjugador.js v${version} | ${license} (c) 2016-${(new Date()).getFullYear()} by ${author}`;
module.exports = {
entry: {
'conjugador': './index.js',
'conjugador.min': './index.js'
},
output: {
filename: '[name].js',
path: path.resolve(__dirname, 'dist'),
library: 'conjugar',
libraryTarget: 'umd',
// Para resolver um problema com o Webpack 4 (webpack#6522).
globalObject: `typeof self !== 'undefined' ? self : this`
},
optimization: {
minimize: false
},
plugins: [
new UglifyjsPlugin({
include: /\.min\.js$/,
uglifyOptions: {
output: {
comments: false
}
}
}),
new BannerPlugin(banner)
]
};