You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mini-css-extract-plugin can be used to extract every imported stylesheets into a single file, without also loading it. This is the default behavior of the plugin.
This behavior is absent from experiments.css.
What is the current behavior?
Using experiments.css = true:
import "./style.css" creates main.css and it will attempt to load the file
new URL("./style.css", import.meta.url) creates multiple [hash].css files and it won't attempt to load them
If the current behavior is a bug, please provide the steps to reproduce.
In short, the config is just {experiments: {css: true}}
What is the expected behavior?
It should match the behavior of the previous plugin, which just created a unified main.css file and did not attempt to load it. As a bonus, the resulting main.js is completely empty:
The new logic will autoload stylsheets by default, because it will allow preload/prefetch/track loaded modules and etc, we will provide an option to disable such behaviour, so close in favor #14893 (I updated our roadmap)
Bug report
mini-css-extract-plugin
can be used to extract every imported stylesheets into a single file, without also loading it. This is the default behavior of the plugin.This behavior is absent from
experiments.css
.What is the current behavior?
Using
experiments.css = true
:import "./style.css"
createsmain.css
and it will attempt to load the filenew URL("./style.css", import.meta.url)
creates multiple[hash].css
files and it won't attempt to load themIf the current behavior is a bug, please provide the steps to reproduce.
You can find the source and
dist
results in https://github.com/fregante/webpack-sandbox/tree/main/experiments.cssIn short, the config is just
{experiments: {css: true}}
What is the expected behavior?
It should match the behavior of the previous plugin, which just created a unified
main.css
file and did not attempt to load it. As a bonus, the resultingmain.js
is completely empty:Other relevant information:
webpack version: 5.88.2
Node.js version: 18
Operating System: macOS
Additional tools:
Originally reported in #14893 (comment)
The text was updated successfully, but these errors were encountered: