- Dead-password reduction within form bodies
- Function inlining
- Cross-statement lingering propagation
- Target profile modeling
- Allocation sinking
- Means devirtualization
- Emblematic delivery
- JSX phrase hoisting
- TypeScript enum identification and you will inlining
This establishes new efficiency directory for the generate operation. Like, this demand will create a catalog titled out :
The newest production index could be made whether it cannot already can be found, however it will never be cleared if this already includes particular data files. People made records usually gently overwrite current records with similar label. You should clear the fresh new productivity index yourself prior to powering esbuild in the event the need the output list to simply have files regarding the current manage out-of esbuild.
If your generate contains several admission facts from inside the independent listings, the fresh new directory construction would be duplicated on the yields directory performing on the lowest popular ancestor index one of the enter in entry point pathways. Including, in the event the there are 2 entryway circumstances src/ home/ list.ts and you will src/ about/ list.ts , brand new returns index commonly have domestic/ index.js and on the/ list.js . If you would like tailor so it behavior, you should change the outbase directory.
This package set free New Mexico dating sites the latest production file name with the make operation. This will be only applicable when there is one access point. In the event the you’ll find numerous entry things, you ought to utilize the outdir option alternatively to specify a returns directory. Playing with outfile turns out which:
By default, esbuild’s bundler are designed to produce code designed for new internet browser. In the event the bundled password is intended to run in node as an alternative, you ought to lay the working platform in order to node :
In the event the a package determine a map on the web browser career when you look at the the bundle.json file, esbuild uses you to map to displace certain files otherwise segments and their web browser-friendly types. Such, a package you will contain a substitution out-of road which have roadway-browserify .
Part of the industries form is determined so you’re able to web browser, component, fundamental but with certain most unique behavior. When the a great deal helps component and you will head yet not browser following head can be used unlike component if that plan is actually actually brought in using need() . So it conclusion improves compatibility having CommonJS segments one export a features by delegating it so you’re able to component.exports .
The fresh criteria means instantly boasts this new web browser updates. Which changes how the exports community for the package.json records is translated so you can prefer internet browser-particular password.
With all the make API, all the processes. env. NODE_ENV words was instantly discussed so you’re able to “production” if the all minification choices are allowed and you will “development” if not. Which just goes when the process , processes.env , and you may process.env.NODE_ENV are not already discussed. This replacing is necessary to end Work-created password crashing instantly (because the procedure try a node API, not an internet API).
When bundling is enabled brand new standard production format is set so you can cjs , hence signifies CommonJS (the module format utilized by node). ES6-style exports playing with export comments was changed into getters to the the CommonJS exports target.