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): fix lightningcss dep url resolution with custom root #18125

Merged
merged 9 commits into from
Sep 26, 2024

Conversation

hi-ogawa
Copy link
Collaborator

Copy link

stackblitz bot commented Sep 17, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@hi-ogawa hi-ogawa marked this pull request as ready for review September 17, 2024 04:25
@sapphi-red
Copy link
Member

I pushed a commit that renames root dir to dir dir because root dir has a special meaning and the test wasn't actually testing the issue.

// when `root` dir is present, use it as vite's root
const testCustomRoot = path.resolve(testDir, 'root')
rootDir = fs.existsSync(testCustomRoot) ? testCustomRoot : testDir

@sapphi-red sapphi-red added feat: css p3-minor-bug An edge case that only affects very specific usage (priority) regression The issue only appears after a new release labels Sep 17, 2024
sapphi-red
sapphi-red previously approved these changes Sep 17, 2024
@sapphi-red
Copy link
Member

Sorry, I think I just mixed things up. The first code was correct. 😅

@hi-ogawa
Copy link
Collaborator Author

I pushed a commit that renames root dir to dir dir because root dir has a special meaning and the test wasn't actually testing the issue.

Aha, I didn't notice that. I initially used playground/css-lightningcss/root with a separate config vite.config-root.ts dceaaf3 , but things got broken, so I just moved it off to a separate playground css-lightningcss-root.

@sapphi-red sapphi-red merged commit eb08f60 into vitejs:main Sep 26, 2024
12 checks passed
@hi-ogawa hi-ogawa deleted the fix-lightningcss-dep-url-replace branch September 30, 2024 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: css p3-minor-bug An edge case that only affects very specific usage (priority) regression The issue only appears after a new release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Relative CSS asset import does not work with root config set
3 participants