-
-
Notifications
You must be signed in to change notification settings - Fork 411
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
.js.map source map parsing warnings in Webpack source-map-loader #240
Comments
I'm also facing the same problem and since I'm using Create React App then the webpack config is not easily configurable. |
I think adding "src" to the "files" array in package.json would fix this (in this package, not as a workaround in consumers of timeago) |
This would be useful to reduce the noise created by webpack, any downsides of adding |
You can remove the warning by adding GENERATE_SOURCEMAP=false to your .env file Actually, CRA with Webpack 5.x cause it. They are working on resolving (facebook/create-react-app#11752) |
just for anyone that still lands on this, an alternative library that has a timeago.js-style feature is date-fns https://date-fns.org/ (big thanks to the timeago.js devs, just mentioning :)) |
Getting the following warning:
Looking at the build routine in
package.json
, this package has:TSC emits source map (
abcd.js.map
) like this:The issue is related to "source" property above. Since
src
folder is missing from the timeago.js NPM distribution, Webpack source-map-loader is throwing warnings.My current solution for the Webpack config is:
which basically tells source-map-loader to ignore parsing the source maps for timeago.js.
Is any other solution suggested? Since end users won't have access to TS source files in the dist, should this library stop distributing source maps altogether?
The text was updated successfully, but these errors were encountered: