[PR #69] Added inlineSources: true to tsconfig.json #86

Closed
opened 2026-03-03 00:03:21 +03:00 by kerem · 0 comments
Owner

Original Pull Request: https://github.com/atulmy/gql-query-builder/pull/69

State: closed
Merged: Yes


Hey there 👋

TLDR

I'm hoping to turn on inlineSources in your tsconfig.json file so that webpack stops complaining.

Explanation

I'm working on the gadget-inc/js-clients packages and I'm trying to get rid of webpack source map warnings from being emitted when someone uses our react client in a create-react-app v5 project.

I was able to fix the warnings with this (soon to be merged) PR, but our clients use your package under the hood, and it looks like your package also emits warnings.

Failed to parse source map from 'node_modules/gql-query-builder/src/NestedField.ts' file:
Error: ENOENT: no such file or directory, open 'node_modules/gql-query-builder/src/NestedField.ts'

I figured out that webpack is complaining because your source maps are referencing files in your src directory but you don't include your src directory when you publish to npm.

To fix this, you could do one of the following:

  1. include your src directory when publishing to npm
  2. turn on inlineSources in your tsconfig.json

I think the inlineSources option is the easiest one... but it's up to you 😄

**Original Pull Request:** https://github.com/atulmy/gql-query-builder/pull/69 **State:** closed **Merged:** Yes --- Hey there 👋 **TLDR** I'm hoping to turn on [`inlineSources`](https://www.typescriptlang.org/tsconfig#inlineSources) in your tsconfig.json file so that webpack stops complaining. **Explanation** I'm working on the [gadget-inc/js-clients](https://github.com/gadget-inc/js-clients) packages and I'm trying to get rid of webpack source map warnings from being emitted when someone uses our react client in a create-react-app v5 project. I was able to fix the warnings with [this (soon to be merged) PR](https://github.com/gadget-inc/js-clients/pull/26), but our clients use your package under the hood, and it looks like your package also emits warnings. ```shell Failed to parse source map from 'node_modules/gql-query-builder/src/NestedField.ts' file: Error: ENOENT: no such file or directory, open 'node_modules/gql-query-builder/src/NestedField.ts' ``` I figured out that webpack is complaining because your source maps are referencing files in your `src` directory but you don't include your `src` directory when you publish to npm. To fix this, you could do one of the following: 1. include your `src` directory when publishing to npm 2. turn on `inlineSources` in your tsconfig.json I think the `inlineSources` option is the easiest one... but it's up to you 😄
kerem 2026-03-03 00:03:21 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/gql-query-builder#86
No description provided.