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 4.x.x support? #46

Open
Sombian opened this issue Aug 1, 2020 · 6 comments · May be fixed by #47
Open

css-loader 4.x.x support? #46

Sombian opened this issue Aug 1, 2020 · 6 comments · May be fixed by #47

Comments

@Sombian
Copy link

@Sombian Sombian commented Aug 1, 2020

vue-loader stopped working after upgrade css-loader to 4.x.x from 3.6.0.
i see some breaking changes documented on css-loader repo.
please fix this.

@huangkaiqiao
Copy link

@huangkaiqiao huangkaiqiao commented Aug 4, 2020

I have encountered the same problem as you do.
i can't find out what's wrong with webpack.config.js of my project
until open this issue.
plz fix this. or change official document of vue-loader.
thanks a lot.

@foxxyz
Copy link

@foxxyz foxxyz commented Aug 7, 2020

@huangkaiqiao for most purposes you can safely swap out vue-style-loader with style-loader and your project should work fine. Also see #42

I will look into what exactly is causing the problem...

Edit: the problem is that css-loader's esModule option is set to true by default in v4. The correct workaround for now is replacing the css-loader declaration in your webpack config with:

{
    loader: 'css-loader',
    options: {
        esModule: false
    }
}
@nofacer
Copy link

@nofacer nofacer commented Aug 9, 2020

@foxxyz works for me. Thanks a lot.

Awea added a commit to wearemd/spa-starter that referenced this issue Aug 10, 2020
@IAmJulianAcosta
Copy link

@IAmJulianAcosta IAmJulianAcosta commented Aug 13, 2020

Confirmed, @foxxyz solution worked

@privatenumber
Copy link

@privatenumber privatenumber commented Sep 20, 2020

Minimal reproduction repo for reference: https://github.com/privatenumber/vue-css-loader-bug

@ccnixon
Copy link

@ccnixon ccnixon commented Nov 5, 2020

I was stuck on this issue for days. @foxxyz solution worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

7 participants
You can’t perform that action at this time.