GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||
GeezerVison is showing github.com — feat: minimize css when css experiment is enabled by burhanuday · Pull Request #17309 · webpack/webpack Conversation
|
|
For maintainers only:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I think we should postpone it for webpack v6, cssnano is big and slow and we need to think about it deeply, perhaps we can collaborate with the rspack team
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
If speed is the concern then we could try out LightningCSS. Though a different problem with |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@hardfist We should collaborate here, maybe not this exact implementation but have a common goal for CSS minification for native CSS support? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
we are using swc-css to minify css because we are also using swc-css to support native css,but swc-css might have bigger size than lightning css,which may be a concern for webpack |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@hardfist Node.js 10 is not our radar, so we can say - if you want the latest feature - do not use node.js 10, you the latest LTS, but yeah wasm solution will be fine (still need check perf) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
since webpack already implemented a css parser for native css support, it seems webpack could reimplement the css minification using the same parser(same parser for parse & minification seems ideal, but it maybe out of scope) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I agree with that, webpack's default css minifier should be small & fast otherwise people may blame webpack for speed, and it seems vite5 may plan to choose lightning css as css minifier vitejs/vite#12466. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@hardfist yeah, but there is a performance bottleneck between js and rust - serialization (you know 😄 ), I honestly don't know what would be better for us:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Perhaps we should really look at wasm and focus our efforts on swc minificator |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
serialization maybe not a problem for minify but a problem for parse,if size is not a concern for webpack i think swc minification or lightingcss is a better option for css minify |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Yeah, I will think about it more |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
vite has added support for lightningcss vitejs/vite#12807 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@burhanuday We've been supporting this for a long time (minimizers), even more - we support all known CSS minimizer |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@alexander-akait rspack supports minimize css out of box now, but one thing comes out if rspack | webpack supports css minimizer out of box // override module.exports = { // ... optimization: { minimizer: [new rspack.LightningCssMinimizerRspackPlugin()], // this will cause js minizer is overwritten }, }; // explicitly override module.exports = { // ... optimization: { minimizer: [new rspack.LightningCssMinimizerRspackPlugin(), rspack.SwcJsMinimizerRspackPlugin()], // this will cause '...' less useful and user need to custom the default js mimizer }, }; it can be solved if we can split minimizer option for js and css module.exports = { // ... optimization: { minimizer: { css: [new rspack.LightningCssMinimizerRspackPlugin() ] // this will only override css minimizer but js minimizer still use the default } }, }; |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@hardfist I am fine with CSS minimizer out of box, the main problem - I want to finish all CSS roadmap and then merge it to avoid extra deps when developers still on css-loader/style-loader/mini-css-extract-plugin, briefly - it should be the last PR 😄 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Close in favor of #21491 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.