maxboeck / eleventastic

An Eleventy Starter Kit
https://eleventastic.netlify.app
MIT License
492 stars 31 forks source link

Source maps #26

Open Lovor01 opened 2 years ago

Lovor01 commented 2 years ago

I am developing some front-end scripts in my projects, but it is hard to debug them, since webpack is not producing source maps. Apparently, __scripts.11ty.js processes and packages front end scripts, but source maps are not generated, I presume because of output file system being memory?

I tried setting devtool config property to inline-source-map, where webpack inlines source map as data-uri, but this does not work for me, at least in Firefox developer edition 95.

Lovor01 commented 2 years ago

Source maps started working with inline-source-map - it was some browser quirk perhaps. However, this method of source maps production is not recommended by webpack. I wonder, if default preferred eval method has advantages and if it has, how to enable this to actually produce maps.