-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
27 lines (26 loc) · 927 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
const path = require('path');
const webpack = require('webpack');
const TerserPlugin = require("terser-webpack-plugin");
const PACKAGE = require('./package.json');
module.exports = {
mode: "production",
entry: {
TraewellingWidget: './src/TraewellingWidget.js',
},
output: {
path:path.resolve(__dirname, "dist"),
filename: "TraewellingWidget.js"
},
experiments: {
topLevelAwait: true,
},
plugins: [
new webpack.BannerPlugin({
banner: `// Variables used by Scriptable.\r\n// These must be at the very top of the file. Do not edit.\r\n// icon-color: orange; icon-glyph: magic;\r\n\r\n// ${PACKAGE.name}\r\n// by ${PACKAGE.author}\r\n\r\n// Version - ${PACKAGE.version} (${new Date().toUTCString()})\r\n// GitHub - ${PACKAGE.homepage}\r\n// Donate - ${PACKAGE.funding.url}\r\n// License - ${PACKAGE.license}\r\n`,
raw: true
}),
],
optimization: {
minimize: false,
},
}