-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
esbuild config:
const buildResult = await esbuild.build({
entryPoints: ["./src/index.ts"],
bundle: true,
platform: "browser",
outfile: outFilePath,
minify: isProd,
tsconfig: "./tsconfig.json",
dropLabels: isProd ? ["DEV"] : [],
drop: isProd ? ["console", "debugger"] : [],
treeShaking: isProd,
define: {
"process.env.VERSION": `"${version}"`,
},
metafile: true,
color: true,
plugins: [
ObfuscatorPlugin({
filter: ['**/src/*.ts', '!**/node_modules/**'],
shouldObfuscateOutput: false,
}),
],
});define not work.
I only want to obfuscate the source code, not the dependencies loaded from node_modules. If set shouldObfuscateOutput = true, The substution on define does work, but it obfuscated all the code and produce a huge output file.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels