Open elia opened 9 years ago
The problem is that serving 50 (or more) assets when debug mode is on can slow down the page load significantly.
For this reason, and others you have mentioned (no preamble and postamble support), I think we should consider the current debug approach deprecated and to be replaced by source maps.
Always serving a concatenated bundle in development matches how the files will be concatenated in production and give way for bundle processors to run both in dev and production identically.
Makes sense, now wondering how usable v4 is today…
Btw that's also the approach I tried in Opal 0.7 but ended up completely breaking source maps due (I think) to ending newlines and sourcemaps concatenation so it it reverted in v0.8.
Any experience with similar problems in sprockets 4?
ref https://github.com/opal/opal-rails/issues/51 cc @wied03
The problem is that serving 50 (or more) assets when debug mode is on can slow down the page load significantly. On the other hand if you're not a library maintainer you probably don't need to debug all the internal dependency of, say, opal (but I suspect the situation is similar with other libraries).
The proposed solution is to have a list of assets for which the
:debug
flag is automatically turned off even whenassets.debug
is set to true.