capacitor-community / in-app-review

Let users rate your app using native review app dialog for both Android and iOS.
MIT License
163 stars 20 forks source link

Source maps inclusion yields warnings #57

Closed optimix closed 6 months ago

optimix commented 8 months ago

Hi,

Thank you very much for this great plugin which works fine :)

This is a low priority issue, but in some apps using webpack, it yields a warning because of the source maps:

WARNING in ./node_modules/capacitor-rate-app/dist/esm/web.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/path/to/app/node_modules/capacitor-rate-app/src/web.ts' file: Error: ENOENT: no such file or directory, open '/path/to/app/node_modules/capacitor-rate-app/src/web.ts'
...

This is because the .js.map point to source files from src folder which is not bundled. For example, dist/esm/web.js.map references ../../src/web.ts which does not exist because folder src is not bundled. The warnings go away if removing the sourceMappingURL comments (+ updating the package version to avoid any particular caching).

Maybe the source mapping should be disabled for bundled releases ?

tafelnl commented 6 months ago

Should be fixed in v6