release notes
An extremely fast bundler for the web
release notes
Published 2/18/2022
PatchSafe upgradeUpdate feature database to indicate that node 16.14+ supports import assertions (#2030)
Node versions 16.14 and above now support import assertions according to these release notes. This release updates esbuild's internal feature compatibility database with this information, so esbuild no longer strips import assertions with --target=node16.14:
// Original code
import data from './package.json' assert { type: 'json' }
console.log(data)
// Old output (with --target=node16.14)
import data from "./package.json";
console.log(data);
// New output (with --target=node16.14)
import data from "./package.json" assert { type: "json" };
console.log(data);
Basic support for CSS [@layer](https://github.com/layer) rules (#2027)
This adds basic parsing support for a new CSS feature called [@layer](https://github.com/layer) that changes how the CSS cascade works. Adding parsing support for this rule to esbuild means esbuild can now minify the contents of [@layer](https://github.com/layer) rules:
/* Original code */
[@layer](https://github.com/layer) a {
[@layer](https://github.com/layer) b {
div {
color: yellow;
margin: 0.0px;
}
}
}
/* Old output (with --minify) */
[@layer](https://github.com/layer) a{[@layer](https://github.com/layer) b {div {color: yellow; margin: 0px;}}}
/* New output (with --minify) */
[@layer](https://github.com/layer) a.b{div{color:#ff0;margin:0}}
You can read more about [@layer](https://github.com/layer) here:
Note that the support added in this release is only for parsing and printing [@layer](https://github.com/layer) rules. The bundler does not yet know about these rules and bundling with [@layer](https://github.com/layer) may result in behavior changes since these new rules have unusual ordering constraints that behave differently than all other CSS rules. Specifically the order is derived from the first instance while with every other CSS rule, the order is derived from the last instance.
release notes
Published 2/18/2022
PatchSafe upgradeUpdate feature database to indicate that node 16.14+ supports import assertions (#2030)
Node versions 16.14 and above now support import assertions according to these release notes. This release updates esbuild's internal feature compatibility database with this information, so esbuild no longer strips import assertions with --target=node16.14:
// Original code
import data from './package.json' assert { type: 'json' }
console.log(data)
// Old output (with --target=node16.14)
import data from "./package.json";
console.log(data);
// New output (with --target=node16.14)
import data from "./package.json" assert { type: "json" };
console.log(data);
Basic support for CSS [@layer](https://github.com/layer) rules (#2027)
This adds basic parsing support for a new CSS feature called [@layer](https://github.com/layer) that changes how the CSS cascade works. Adding parsing support for this rule to esbuild means esbuild can now minify the contents of [@layer](https://github.com/layer) rules:
/* Original code */
[@layer](https://github.com/layer) a {
[@layer](https://github.com/layer) b {
div {
color: yellow;
margin: 0.0px;
}
}
}
/* Old output (with --minify) */
[@layer](https://github.com/layer) a{[@layer](https://github.com/layer) b {div {color: yellow; margin: 0px;}}}
/* New output (with --minify) */
[@layer](https://github.com/layer) a.b{div{color:#ff0;margin:0}}
You can read more about [@layer](https://github.com/layer) here:
Note that the support added in this release is only for parsing and printing [@layer](https://github.com/layer) rules. The bundler does not yet know about these rules and bundling with [@layer](https://github.com/layer) may result in behavior changes since these new rules have unusual ordering constraints that behave differently than all other CSS rules. Specifically the order is derived from the first instance while with every other CSS rule, the order is derived from the last instance.