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

Added inlineSources: true to tsconfig.json #69

Merged
merged 1 commit into from
Mar 24, 2022
Merged

Added inlineSources: true to tsconfig.json #69

merged 1 commit into from
Mar 24, 2022

Conversation

scott-rc
Copy link
Contributor

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 😄

@atulmy atulmy merged commit 43b4309 into atulmy:master Mar 24, 2022
@scott-rc scott-rc deleted the scott-rc/source-maps branch March 24, 2022 19:05
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.

2 participants