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: use full filename for svelte.compile #700

Merged
merged 9 commits into from
Aug 6, 2023
Merged

Conversation

dominikg
Copy link
Member

fixes #699

There is a small chance that this creates a regression with build output still containing absolute paths in sourcemap sources, but in my tests with most recent svelte and vite versions, that is no longer the case.

Copy link
Member

@bluwy bluwy left a comment

Choose a reason for hiding this comment

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

If this produces stable builds on different machines, then it sounds like the best and simplest fix for me 👍

@dominikg
Copy link
Member Author

looks like the windows test is failing, ran it in my local windows 10 vm and it produced a development build with add_location calls? wtf

@dominikg
Copy link
Member Author

dominikg commented Aug 5, 2023

turns out something in our e2e tests sets process.env.NODE_ENV to TEST which caused viteConfig.isProduction to be false, which in turn enabled the svelte compiler option dev.

A better default value for that would be command==='serve' || mode==='development' || process.env.NODE_ENV ==='development' but that is a breaking change, so for now we force production build in our tests via NODE_ENV=production

@dominikg dominikg merged commit 703c377 into main Aug 6, 2023
7 checks passed
@dominikg dominikg deleted the fix/absolute-paths-v2 branch August 6, 2023 09:21
@github-actions github-actions bot mentioned this pull request Aug 6, 2023
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.

link to correct source in error page
2 participants