-
Notifications
You must be signed in to change notification settings - Fork 47
/
webpack.mix.js
37 lines (33 loc) · 1.03 KB
/
webpack.mix.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
const mix = require('laravel-mix');
const fs = require('fs');
mix.options({
terser: {
extractComments: false,// Any other value will make the license header be removed
},
});
mix.webpackConfig(webpack => {
const package = JSON.parse(fs.readFileSync(__dirname + '/package.json'));
return {
output: {
library: {
name: 'PureCounter',
type: 'umd',
}
},
plugins: [
new webpack.BannerPlugin({
banner: [
'purecounter.js - A simple yet configurable native javascript counter which you can count on.',
'Author: Stig Rex',
'Version: ' + package.version,
'Url: https://github.com/srexi/purecounterjs',
'License: MIT',
].join("\n"),
}),
]
};
});
mix
.js('js/purecounter_vanilla.js', 'dist/')
.js('purecounter.js', 'dist/')
.sourceMaps(true);// Enable source maps for better audits