When I add a stylus plugin to stylusOptions.use and run webpack in dev mode. At startup, everything is normal. However, after I change the code and trigger recompilation, the plugin in stylusOptions.use are gone, which leads to a build failure.
Actual Behavior
Due to the lack of plugins, the Stylus function I defined is not imported, resulting in the generated product not being correctly recognized by the css-loader.
Expected Behavior
During recompilation, the plugin in stylusOptions.use can still be found.
Bug report
When I add a stylus plugin to
stylusOptions.use
and run webpack in dev mode. At startup, everything is normal. However, after I change the code and trigger recompilation, the plugin instylusOptions.use
are gone, which leads to a build failure.Actual Behavior
Due to the lack of plugins, the Stylus function I defined is not imported, resulting in the generated product not being correctly recognized by the css-loader.
Expected Behavior
During recompilation, the plugin in
stylusOptions.use
can still be found.How Do We Reproduce?
repository: https://github.com/zavierkolten/stylus-loader-debug branch: main
For easy viewing, I used pnpm patch to add a line of
console.log
to "stylus-loader/dist/index.js"First time:
After recompiling:
Please paste the results of
npx webpack-cli info
here, and mention other relevant information