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

vue-loader网站手动配置里vue-style-loader版本过低,造成css解析了不渲染到页面 #1709

Closed
leer561 opened this issue Aug 3, 2020 · 6 comments

Comments

@leer561
Copy link

leer561 commented Aug 3, 2020

https://vue-loader.vuejs.org/guide/#manual-setup

vue-style-loader版本过低,现在最新的css-loader一起使用,有问题,CSS无法渲染,建议换成style-loader
误导了很耽误时间

@vue-bot
Copy link

vue-bot commented Aug 3, 2020

Hello, thank you for taking time filling this issue!

However, we kindly ask you to use our Issue Helper when creating new issues, in order to ensure every issue provides the necessary information for us to investigate. This explains why your issue has been automatically closed by me (your robot friend!).

I hope to see your helper-created issue very soon!


你好,你的 issue 不符合我们所要求的格式,因此已被自动关闭。为了确保每个 issue 都提供必需的相关信息,请务必使用我们的 Issue 向导 来创建新 issue,谢谢!

@vue-bot vue-bot closed this as completed Aug 3, 2020
@Justineo
Copy link
Member

Justineo commented Aug 4, 2020

Confirmed the problem reported is valid from other sources so I'll reopen this one. (Please follow the issue template next time.)

@Justineo Justineo reopened this Aug 4, 2020
@aZilberstein
Copy link

@leer561 谢谢您的帮助!!! Your comment has saved me a lot of time I'd been wasting trying to figure out why wouldn't vue-style-loader work.

I tried to Google Translate the comment made by @leer561 and in a few words it means that the newest version of css-loader is incompatible with an outdated vue-style-loader package, so as of now only using the regular style-loader seems to work fine.

@gluons
Copy link

gluons commented Aug 15, 2020

I found the answer. Seem vue-style-loader is broken with css-loader v4.

See vuejs/vue-style-loader#46.


We need to disable css-loader's esModule to make it work again.
Thanks to @foxxyz for the solution.

{
	loader: 'css-loader',
	options: {
		esModule: false
	}
}

@rookiebulls
Copy link

Saved my day!!

@loving0606
Copy link

谢谢,找了半天都没找到问题

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

7 participants