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

fix(css): prevent commonjs-proxy module been bundled into css chunk w… #2160

Merged
merged 1 commit into from
Feb 26, 2021

Conversation

meowtec
Copy link
Contributor

@meowtec meowtec commented Feb 22, 2021

Which will cause minifying css warning.

reproduce

// node_modules/some-package-for-test/index.js
require('./index.css');
// the entry js file
import 'some-package-for-test'
// run build
vite build
// output
warnings when minifying css:
Invalid character(s) 'getAugmentedNamespace from "commonjsHelpers.js"; export default getAugmentedNamespace(test);' at 1:149. Ignoring.
Invalid selector 'import * as test from "/path/project/node_modules/test/index.css"; import' at 1:20. Ignoring.

@zouhangwithsweet
Copy link

太棒了~ 解决了我遇到的问题
image

@yyx990803 yyx990803 merged commit de33d32 into vitejs:main Feb 26, 2021
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

Successfully merging this pull request may close these issues.

None yet

3 participants