Skip to content

Commit

Permalink
fix: disable esModule output for css-loader
Browse files Browse the repository at this point in the history
From [1] we are told that the esModule interop was added in
[email protected]. It did work well with css-loader@5.
However, since we've upgraded our css-loader dependency to v6,
the issue raises again and I have no idea why it happens.
I think disabling `esModule` is the only workaround we can use...

[1]: vuejs/vue-style-loader#50

Signed-off-by: Chawye Hsu <[email protected]>
  • Loading branch information
chawyehsu committed Jan 20, 2025
1 parent 85e18f9 commit a622cbd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/@alterjs/saber/src/plugins/config-css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ const configCss: SaberPlugin = {

const cssLoaderOptions = Object.assign(
{
// vue-loader/vue-style-loader do not support ES modules CSS interop
// FIXME(chawyehsu): https://github.com/vuejs/vue-style-loader/issues?q=esmodule
esModule: false,
sourceMap,
modules: modules?.mode
? {
Expand Down

0 comments on commit a622cbd

Please sign in to comment.