![]() These syntax features are currently always passed through un-transformed: Syntax transformġ Unsupported regular expression literals are transformed into a new RegExp() constructor call so you can bring your own polyfill library to get them to work anyway. These syntax features are conditionally transformed for older browsers depending on the configured language target: Syntax transform ![]() Trailing commas in function parameter lists and calls These syntax features are always transformed for older browsers: Syntax transform Newer syntax may not be supported by older browsers, however, so you may want to configure the target option to tell esbuild to convert newer syntax to older syntax as appropriate. Then esbuild will avoid using JavaScript features that are too modern for those browsers.Īll modern JavaScript syntax is supported by esbuild. If this is undesired, you must specify esbuild's target setting to say in which browsers you need the output to work correctly. For example, a != void 0 & a != null ? a : b will become a ? b when minifying is enabled which makes use of syntax from the ES2020 version of JavaScript. Note that by default, esbuild's output will take advantage of all modern JS features. mjs extension is used by node for ECMAScript modules. cjs extension is used by node for CommonJS modules and the. Some file extensions already have a loader configured for them by default, although the defaults can be overridden. Each content type has an associated "loader" which tells esbuild how to interpret the file contents. ![]() ![]() All of the built-in content types are listed below. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |