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

Sourcemaps point to incorrect files #389

Closed
isuru88 opened this issue Mar 26, 2021 · 2 comments · Fixed by #403
Closed

Sourcemaps point to incorrect files #389

isuru88 opened this issue Mar 26, 2021 · 2 comments · Fixed by #403

Comments

@isuru88
Copy link

isuru88 commented Mar 26, 2021

After upgrading from 2.11.0 to 2.12.1, It seems like the packaged output does not contain src which is required by the source maps.

When using @apollo/client v3.3.11, webpack throws the following warning,

WARNING in C:/git/CustomizableSolution/node_modules/@apollo/client/node_modules/graphql-tag/lib/index.js
Module Warning (from C:/git/CustomizableSolution/node_modules/source-map-loader/index.js):
(Emitted value instead of an instance of Error) Cannot find source file '../src/index.ts': Error: Can't resolve '../src/index.ts' in 'C:\git\CustomizableSolution\node_modules\@apollo\client\node_modules\graphql-tag\lib'
 @ C:/git/CustomizableSolution/node_modules/@apollo/client/core/index.js 15:0-30 16:25-28 17:30-33 18:42-45 19:43-46 20:0-15
 @ C:/git/CustomizableSolution/node_modules/@apollo/client/index.js
 @ ./src/apolloClient.ts
 @ ./src/index.tsx
 @ multi C:/git/CustomizableSolution/node_modules/piral-cli-webpack/lib/set-path ./src/index.tsx

Steps to reproduce:

  • Package using npm pack
  • Extract and examine contents of .map type files within lib

Expected output:

  • Since the sources point to files within src. package should contain src

Actual output:

  • Package does not contain src
@ghost
Copy link

ghost commented Apr 26, 2021

I have the exact same issue.

@prcdpr
Copy link

prcdpr commented May 10, 2021

Same, can we get this PR merged?

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 a pull request may close this issue.

2 participants