You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WARNING in xxx/node_modules/timeago.js/esm/register.js
xxx Module Warning (from xxx/node_modules/source-map-loader/dist/cjs.js):
xxx Failed to parse source map from 'xxx/node_modules/timeago.js/src/register.ts' file: Error: ENOENT: no such file or directory, open 'xxx/node_modules/timeago.js/src/register.ts'
Looking at the build routine in package.json, this package has:
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:
{
enforce: "pre", // All output '.js' files will have any sourcemaps re-processed by 'source-map-loader'.
test: /\.js$/,
loader: require.resolve("source-map-loader"),
/**
* timeago.js has issues since their source maps refer to the actual TS source files.
*/
exclude: [/node_modules\/timeago.js/],
}
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:
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: