inikulin/parse5

Failed to parse source map ...

wisammechano opened this issue · 3 comments

I am using parse5 in a react app, and the modules are referring to a sourceMap file that is not being found, which is interrupting the build of the app.

I can confirm checking the dist/index.js in npm

Line 45

//# sourceMappingURL=index.js.map

however, there isn't such file relative to path

lunika commented

I confirm we still have this issue with version 7.1.1 of parse5

43081j commented

fyi @fb55 this is because the files array in the package JSON specifies *.js and not *.js.map

we could either stop generating sourcemaps in prod, or just ship them. what do you think?

fb55 commented

Source maps reference the original TypeScript files. Most of my packages reference the source files on GitHub (example, longer explanation), which I couldn't figure out how to do with the monorepo setup of parse5.

I would prefer to ship useful source maps, but if that isn't possible, removing the reference seems logical.