-
Notifications
You must be signed in to change notification settings - Fork 27
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(mc-scripts): support prod sourcemaps when using Vite #2924
Conversation
🦋 Changeset detectedLatest commit: efe1bb0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 35 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Deploy preview for merchant-center-application-kit ready! ✅ Preview Built with commit efe1bb0. |
@@ -251,6 +251,7 @@ jobs: | |||
- name: Building Playground application | |||
run: yarn playground:build | |||
env: | |||
NODE_OPTIONS: '--max-old-space-size=6144' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok so it seems to work but we need to bump the memory.
Maybe we make it an opt-in option to generate the sourcemaps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a great idea 👍
cd7632f
to
efe1bb0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Until now Vite (Rollup) had some issues when running production builds with the sourcemaps option activated.
You can read a bit the thread here: vitejs/vite#2433
However, yesterday an attempt to mitigate this issue was released in Rollup: vitejs/vite#2433 (comment)
The fix is opt-in via the
cache
option of Rollup by turning it off. To quote the outcome:Let's try it out then!