date-fns / date-fns-upgrade

A tool for upgrading date-fns versions
8 stars 8 forks source link

Warning about missing sourcemap when using webpack5 #25

Open oskarwrobel opened 2 years ago

oskarwrobel commented 2 years ago

Hi,

I'm wondering if it would be possible to add

"inlineSources": true,

to tsconfig.json file?

It won't affect source code at all but will satisfy webpack5 complaints about source map files, however, it will increase the size of source maps.

Currently, bundling the following code:

import { convertTokens } from '@date-fns/upgrade/v2/convertTokens';

...

produces this warning:

WARNING in ./node_modules/@date-fns/upgrade/v2/convertTokens/index.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/Users/owrobel/projects/webpack-demo/node_modules/@date-fns/src/v2/convertTokens/index.ts' file: Error: ENOENT: no such file or directory, open '/Users/owrobel/projects/webpack-demo/node_modules/@date-fns/src/v2/convertTokens/index.ts'
 @ ./src/index.js 1:0-67 3:12-25