Polymer / tools

Polymer Tools Monorepo
BSD 3-Clause "New" or "Revised" License
430 stars 200 forks source link

--inline-scripts doesn't rewrite sourceMappingURL paths #1849

Open eximius313 opened 8 years ago

eximius313 commented 8 years ago

Using --inline-scripts with js files that include sourceMappingURL results in 404 error while looking for map file. Look at web-animations-js component. All of the JS files: web-animations-next-lite.min.js, web-animations-next.min.js and web-animations.min.js have sourceMappingURL pointing to local directory. When you vulcanize this component along with theese scripts it will look for map files in the place where vulcanized file is located instead of ../web-animations-js/

Duder-onomy commented 8 years ago

I have this same issue.

Seems like the web animations library has a sourceMappingUrl. When using the --inline-scripts options this source mapping URL is included at the end of the inlined script: //# sourceMappingURL=web-animations-next-lite.min.js.map

This makes a network request for the source map. This bogs down our dev server and litters our terminals with fake errors.

Any ideas on how to get rid of this? (besides cleaning the file with custom code.)

Should we open an issue on the web-animations repo?

Duder-onomy commented 8 years ago

@eximius313 Here is what we did to get rid of this error:

sed -i '' -e 's/\/\/# sourceMappingURL=web-animations-next-lite.min.js.map//g' pathToVulcanizedFile

There is probably a cooler way to do it. Pipe it through something.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.