Skip to content

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

@AE-MS

Description

@AE-MS

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions