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: add sourcemapIgnoreList configuration option #12174

Merged
merged 8 commits into from
Mar 1, 2023
Prev Previous commit
docs: make it slightly clearer
  • Loading branch information
danielroe committed Mar 1, 2023
commit e48c3869c5d7bcf5325e7d1e8fea361acbd9f3cb
2 changes: 2 additions & 0 deletions docs/config/server-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,8 @@ export default defineConfig({

Whether or not to ignore source files in the server sourcemap, used to populate the [`x_google_ignoreList` source map extension](https://developer.chrome.com/blog/devtools-better-angular-debugging/#the-x_google_ignorelist-source-map-extension).
Copy link
Member

Choose a reason for hiding this comment

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

@bmeurer not blocking for the PR, but it would be nice to be able to link to a more focused blog post about x_google_ignoreList. If your team ends up having a better resource in the future, would you do a PR to rewire these references?

Copy link
Contributor

@jecfish jecfish Mar 1, 2023

Choose a reason for hiding this comment

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

+1 to this, I will draft something up and send another PR to update it. Thanks for calling that out!

Copy link
Member

Choose a reason for hiding this comment

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

Thanks @jecfish, sounds great!


By default, it excludes all paths containing `node_modules`. You can pass `false` to disable this behavior, or, for full control, a function that takes the source path and sourcemap path and returns whether to ignore the source path.

```js
export default defineConfig({
server: {
Expand Down
2 changes: 1 addition & 1 deletion packages/vite/src/node/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export interface ServerOptions extends CommonServerOptions {
*
* By default, it excludes all paths containing `node_modules`. You can pass `false` to
* disable this behavior, or, for full control, a function that takes the source path and
* sourcemap path.
* sourcemap path and returns whether to ignore the source path.
*/
sourcemapIgnoreList?:
| false
Expand Down