mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Tidy up esbuild bundle configs
This commit is contained in:
+2
-4
@@ -20,23 +20,22 @@ const config = {
|
||||
|
||||
/** @type {esbuild.BuildOptions} */
|
||||
const commonOptions = {
|
||||
bundle: true,
|
||||
format: 'esm',
|
||||
target: 'es2021',
|
||||
sourcemap: true,
|
||||
treeShaking: true,
|
||||
logLevel: 'debug',
|
||||
};
|
||||
|
||||
/** @type {esbuild.BuildOptions} */
|
||||
const devOptions = {
|
||||
minify: false,
|
||||
treeShaking: true,
|
||||
};
|
||||
|
||||
/** @type {esbuild.BuildOptions} */
|
||||
const prodOptions = {
|
||||
minify: true,
|
||||
treeShaking: true,
|
||||
logLevel: 'debug',
|
||||
legalComments: 'none',
|
||||
// TODO: Mangling private and protected properties will reduce bundle size quite a bit, we must
|
||||
// make sure we don't cast privates to `any` in order to prevent regressions.
|
||||
@@ -81,7 +80,6 @@ function getAddonEntryPoint(addon) {
|
||||
|
||||
/** @type {esbuild.BuildOptions} */
|
||||
let bundleConfig = {
|
||||
bundle: true,
|
||||
...commonOptions,
|
||||
...(config.isProd ? prodOptions : devOptions)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user