-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
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
chore: tweak build config #18622
chore: tweak build config #18622
Conversation
@@ -94,6 +94,7 @@ function createSharedNodePlugins({ | |||
// Since ws is not that perf critical for us, just ignore these deps. | |||
ignore: ['bufferutil', 'utf-8-validate'], | |||
sourceMap: false, | |||
strictRequires: 'auto', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To get slightly smaller bundle.
format: 'cjs', | ||
externalLiveBindings: false, | ||
freeze: false, | ||
sourcemap: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sourcemap
is not set in sharedNodeOptions.output
, but removed because the default value is false
.
if (!code.includes('__require')) return | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only inject __require
if needed.
// lightningcss types are bundled | ||
...Object.keys(pkg.devDependencies).filter((d) => d !== 'lightningcss'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has changed by #18460
Description