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

Missing usePromise.ts file causes webpack/source-map-loader build warnings #40

Open
AE-MS opened this issue Feb 18, 2020 · 0 comments
Open

Comments

@AE-MS
Copy link

AE-MS commented Feb 18, 2020

When my webpack project (which uses source-map-loader) consumes react-promise, it consistently outputs a build warning:

WARNING in D:/<a path>/node_modules/react-promise/dist/esm/usePromise.js Module Warning (from D:/<a path>/node_modules/source-map-loader/index.js): (Emitted value instead of an instance of Error) Cannot open source file 'D:\<a path>\node_modules\react-promise\src\usePromise.ts': Error: ENOENT: no such file or directory, open 'D:\<a path>\node_modules\react-promise\src\usePromise.ts' @ ./src/index.tsx 19:40-64

Indeed usePromise.js.map includes a reference to "../../src/usePromise.ts" and usePromise.ts is not included in the react-promise package.

It seems like either that source file should be included in the package or the map file should not reference it to avoid causing the warning?

Thanks!

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

1 participant