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

chore: fix moduleSideEffects in build script on Windows #18518

Merged

Conversation

sapphi-red
Copy link
Member

Description

@sapphi-red sapphi-red added the p1-chore Doesn't change code behavior (priority) label Oct 30, 2024
@@ -44,6 +44,7 @@ const clientConfig = defineConfig({
const sharedNodeOptions = defineConfig({
treeshake: {
moduleSideEffects(id, external) {
id = id.replaceAll('\\', '/')
Copy link
Member Author

@sapphi-red sapphi-red Oct 30, 2024

Choose a reason for hiding this comment

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

On windows, \\ is used instead of / and the following if block was not used.

Copy link
Member

Choose a reason for hiding this comment

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

Interesting. I thought Rollup already normalizes it for us.

Copy link
Member Author

Choose a reason for hiding this comment

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

@sapphi-red sapphi-red enabled auto-merge (squash) October 30, 2024 06:51
@sapphi-red sapphi-red disabled auto-merge October 30, 2024 09:53
@sapphi-red sapphi-red merged commit 25fe9e3 into vitejs:main Oct 30, 2024
15 checks passed
@sapphi-red sapphi-red deleted the chore/fix-windows-module-sideeffects branch October 30, 2024 09:53
@sapphi-red
Copy link
Member Author

(merging to cut a release)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p1-chore Doesn't change code behavior (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants