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

Include src in compiled package #20

Closed
okhomenko opened this issue Mar 19, 2020 · 1 comment
Closed

Include src in compiled package #20

okhomenko opened this issue Mar 19, 2020 · 1 comment

Comments

@okhomenko
Copy link

My webpack throwing a lot of warnings about sourcemaps.

WARNING in ./node_modules/zod/lib/types/string.js
Module Warning (from ./node_modules/source-map-loader/index.js):
(Emitted value instead of an instance of Error) Cannot find source file '../../src/types/string.ts': Error: Can't resolve '../../src/types/string.ts' in '/Users/okhomenko/brightback/brightback-server/src/main/webpack/node_modules/zod/lib/types'

WARNING in ./node_modules/zod/lib/types/object.js
Module Warning (from ./node_modules/source-map-loader/index.js):
(Emitted value instead of an instance of Error) Cannot find source file '../../src/types/object.ts': Error: Can't resolve '../../src/types/object.ts' in '/Users/okhomenko/brightback/brightback-server/src/main/webpack/node_modules/zod/lib/types'

It's trying to merge sourcemaps from zod and can't find source typescript files.
@vriad Could you please include src as part of the published package?

@colinhacks
Copy link
Owner

colinhacks commented Mar 24, 2020

It causes issues in other people's builds if the source is included with the package.

Based on a quick search you can solve your issue by excluding node_modules from their source-maps-loader plugin. Link: apollographql/react-apollo#597 (comment)

Let me know if that doesn't work, closing in the meantime. 👍

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

No branches or pull requests

2 participants