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

Commented CSS caused error on npm run build #426

Closed
acoyiu opened this issue Jun 22, 2020 · 6 comments · Fixed by #432
Closed

Commented CSS caused error on npm run build #426

acoyiu opened this issue Jun 22, 2020 · 6 comments · Fixed by #432

Comments

@acoyiu
Copy link

acoyiu commented Jun 22, 2020

Commented CSS will throw error on npm run build

Reproduction

paste these into completely new project css will throw error on build
/@font-face {
font-family: 'abcde';
src: url('./assets/fonts/abc.ttf') format('truetype');
}
/

System Info

vite v1.0.0-beta.2

@underfin
Copy link
Member

underfin commented Jun 22, 2020

The plain css is not sppport this comment synax.

Can you provider a reproduction with this? I test it and get successful build.

@acoyiu
Copy link
Author

acoyiu commented Jun 22, 2020

sorry, mis-typed

should be

/*
@font-face {
font-family: 'abcde';
src: url('./assets/fonts/abc.ttf') format('truetype');
}
*/

@underfin
Copy link
Member

underfin commented Jun 22, 2020

Can you provider error logs with vite build --debug or a production?

@underfin
Copy link
Member

underfin commented Jun 23, 2020

@shengxinjing thanks for tract this. I also find css in dist without compressed and fix it together.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@underfin @acoyiu and others