forked from T-REX-XP/RRManager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
28 lines (27 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
const path = require('path');
const TerserPlugin = require('terser-webpack-plugin');
module.exports = {
target: ['web', 'es5'], // Adjust this to your target environment
mode: 'development', // Enable webpack's built-in optimizations for production mode
entry: './src/src/index.js', // Adjust this to the path of your JS file
output: {
filename: 'rr-manager.js', // The output file name
path: path.resolve(__dirname, './src/ui/'), // Output directory
// chunkFormat: 'array-push', // Output format
// Other output settings...
environment: {
// Specify the environment features you want to use
arrowFunction: false, // Use arrow functions
const: true, // Use const and let
module: true, // Target environment supports ES6 module natively
},
},
// optimization: {
// minimize: true, // Enable minimization
// minimizer: [new TerserPlugin()], // Use TerserPlugin for minification
// },
experiments: {
outputModule: true, // Enable outputting module format
},
devtool: 'source-map', // Generate source map files
};