We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
index.js
let classMap = new Map(); function test() { console.log('hello world') }
and build
result := api.Build(api.BuildOptions{ EntryPoints: []string{"index.js"}, AbsWorkingDir: cwd + "/js", Platform: api.PlatformNode, Bundle: true, Write: true, Outfile: "bundle.js", })
get bundle.js
// index.js var classMap = new Map();
Why does the test function dissapear?
OS: Ubuntu 20.04.3 LTS golang: go1.17.1 esbuild: v0.12.28
The text was updated successfully, but these errors were encountered:
Because you're doing bundle, which enables DCE (Dead Code Elimination) by default (and can not be disabled).
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
index.js
and build
get bundle.js
Why does the test function dissapear?
OS: Ubuntu 20.04.3 LTS
golang: go1.17.1
esbuild: v0.12.28
The text was updated successfully, but these errors were encountered: