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(vite): add node_modules and buildDir to x_google_ignoreList #19243

Merged
merged 1 commit into from Mar 2, 2023

Conversation

danielroe
Copy link
Member

@danielroe danielroe commented Feb 23, 2023

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Rollup now supports (rollup/rollup#4848) adding certain files to the x_google_ignoreList source map extension. We can opt-in to this to provide a better default experience on Chrome.

Before After
CleanShot 2023-02-23 at 15 17 10@2x CleanShot 2023-02-23 at 15 16 18@2x

Limitations: This is a specific enhancement only for vite. More significantly, at the moment this is only processed in the rollup/vite production build rather than in development, which is a bit of a pain. I've marked this as draft to investigate further. It might require an upstream vite enhancement. This will need to be enabled upstream in vite first before being configurable here.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@codesandbox
Copy link

codesandbox bot commented Feb 23, 2023

CodeSandbox logoCodeSandbox logoΒ  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

@bmeurer
Copy link

bmeurer commented Feb 23, 2023

Nice! I just captured this in our tracking doc. πŸ‘

@danielroe danielroe marked this pull request as ready for review February 23, 2023 21:27
@danielroe danielroe merged commit 21e3e17 into main Mar 2, 2023
@danielroe danielroe deleted the feat/ignore-nm-stack branch March 2, 2023 15:28
@@ -63,6 +63,9 @@ export async function bundle (nuxt: Nuxt) {
copyPublicDir: false,
rollupOptions: {
output: {
sourcemapIgnoreList: (relativeSourcePath) => {
return relativeSourcePath.includes('/node_modules/') || relativeSourcePath.includes(ctx.nuxt.options.buildDir)
Copy link

Choose a reason for hiding this comment

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

Does this work on Windows? For rollup I had to change it to relativeSourcePath.includes('node_modules') to make the test pass on the Windows bot.

Copy link
Member Author

Choose a reason for hiding this comment

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

updated in 73ade18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants