Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

css-loader 5.x.x support? #50

Closed
nolimitdev opened this issue Dec 12, 2020 · 5 comments
Closed

css-loader 5.x.x support? #50

nolimitdev opened this issue Dec 12, 2020 · 5 comments

Comments

@nolimitdev
Copy link

vue-style-loader does not work also with css-loader 5.x.x such as with css-loader 4.x.x

@Byur
Copy link

Byur commented Dec 25, 2020

vue-style-loader does not work also with css-loader 5.x.x such as with css-loader 4.x.x

just set value of attribute "esModule" to false in css-loader's options.

@dreampickers
Copy link

Useful! 👍

{
  test: /\.styl(us)?$/,
  use: [
    'vue-style-loader',
    {
      loader: 'css-loader',
      options: {
        esModule: false,
      },
    },
    'stylus-loader',
  ],
},

@nolimitdev
Copy link
Author

I think that the best is to not use obsolete vue-style-loader at all and use rather original style-loader.

@shunyue1320
Copy link

shunyue1320 commented Jan 18, 2021

Pro-test effective

webpack.config.js:

{
  test: /\.css$/,
  use: [
    'vue-style-loader',
    {
      loader: 'css-loader',
      options: {
        esModule: false
      }
    }
  ]
},

package.json:

"css-loader": "3.6.0",
"vue-loader": "15.9.6",

@haoqunjiang
Copy link
Member

Fixed in 4.1.3

chawyehsu added a commit to chawyehsu/saber that referenced this issue Jan 20, 2025
From [1] we are told that the esModule interop was added in
vue-style-loader@4.1.3. 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 <su+git@chawyehsu.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants