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

feat(compiler-sfc): export dependencies for plain css and css preproc… #1278

Merged
merged 9 commits into from
Jul 16, 2020

Conversation

underfin
Copy link
Member

@underfin underfin commented Jun 1, 2020

…essor @import

@underfin
Copy link
Member Author

underfin commented Jun 2, 2020

less/less.js#3508. The less imports need next version publish.Them already fix it.

Copy link
Member

@yyx990803 yyx990803 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add tests for these?

preprocessOptions: {
// test with file will get error which `import.scss is not find`
importer: function(url: string, prev: string, done: string) {
if (url === 'import.scss') {
Copy link
Member Author

@underfin underfin Jun 26, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I always got error which import.scss is not find. I try mock fs and path ,but that not work.
other, the test.scss will be parsed with 'http://localhost/test.scss'.

I don‘t reslove the error ... and need you take a look.

@yyx990803
Copy link
Member

I figured out the weird testing issues - Jest is running in jsdom env by default and that makes sass to think it's running in the browser and using a different set of path resolution logic.

@yyx990803 yyx990803 merged commit e41d831 into vuejs:master Jul 16, 2020
@underfin underfin deleted the css-preprocessor-dep branch July 17, 2020 02:02
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.

3 participants