Closed yanjiez closed 1 month ago
I faced the same errors
I have no idea where to start - haven't been able to reproduce this.
I am hoping that this is resolved in https://github.com/thompsonsj/slate-serializers/releases/tag/v2.2.0 where a lot of dependencies have been updated. If not, any more information to help me recreate this? e.g. node version?
I checked the new 2.2.0 version and the issue is still present.
Node version 16.10.0
Please let me know what additional information I could provide to help to find and resolve the issue.
I believe this is related to what files are actually being included in the package, which does include the sourcemap files, but not the ts files that the sourcemaps are trying to point to. For example, when I look at the @slate-serializers/dom/src/index.js.map
on npm it's trying to include this file as a source: "../../../../packages/dom/src/index.ts"
. But no index.ts is present in the src folder in the package, so it's unable to find the file. Also, even if the index.ts file was present, I'm not sure that this source path would resolve correctly as the ../../../../packages doesn't seem like it corresponds well to where the file would be once it's in a node_modules.
On the other hand, if you adjust your source-map-loader configuration, you can tell it to ignore these files and make the warnings go away. Something like:
loader.exclude = [path.resolve(__dirname, './node_modules/@slate-serializers')];
Thanks @shank-eric and @yanjiez . Version 2.2.1 no longer includes source maps, so those warnings should go away 👍
I'll bring back source maps if I can figure out how to generate them properly in a monorepo or NX adds guidance/support for this.