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
Describe the bug
Source map URLs are provided as comments in the dist bundles, but the src directory does not exist in the npm package, giving many warnings of type:
WARNING in ./node_modules/svg2pdf.js/dist/svg2pdf.es.min.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'node_modules/svg2pdf.js/src/nodes/geometrynode.ts' file: Error: ENOENT: no such file or directory, open 'node_modules/svg2pdf.js/src/nodes/geometrynode.ts'
To Reproduce
Steps to reproduce the behavior:
npm install svg2pdf.js jspdf
import 'svg2pdf.js'
Use CRA or webpack to bundle and observe warnings at compilation time.
Expected behavior
Include src/ in npm package for the source map to work, or remove source map URL comments?
Additional context
As a workaround, we currently run this post install command to remove warnings from svg2pdf.js source maps, but still have source maps for other packages:
sed -i '/^\/\/# sourceMappingURL=/d' ./node_modules/svg2pdf.js/dist/*
The text was updated successfully, but these errors were encountered:
Honestly, I am not so much in favor of increasing the npm bundle size, just to make debugging a tiny bit easier. If you really need to debug and don't develop the npm module, I think it should be OK to require downloading specific files from GitHub just for this purpose and not have everyone and every build job download a bundle that contains >60% just "dead code bytes".
So in a way, I would actually favor solution one where we get rid of the source map comments.
How do other libraries handle this? What do you think?
Describe the bug
Source map URLs are provided as comments in the
dist
bundles, but thesrc
directory does not exist in thenpm
package, giving many warnings of type:To Reproduce
Steps to reproduce the behavior:
npm install svg2pdf.js jspdf
import 'svg2pdf.js'
Expected behavior
Include
src/
innpm
package for the source map to work, or remove source map URL comments?Additional context
As a workaround, we currently run this post install command to remove warnings from
svg2pdf.js
source maps, but still have source maps for other packages:The text was updated successfully, but these errors were encountered: