Right now debug mode defaults to serving recursive load.php requests for each component (style, scripts) of each module. With the exception of file modules which instead serve individual files from disk directly.
This has various issues (see blocked tasks) and shouldn't be be necessary when we use source maps (see blocking tasks).
Problems that should be solved as part of this redesign:
- In debug mode, we currently can only minify or RTL-flip, not both. Can we provide unminified content via source maps, and still do RTL flipping? – T29025
- In debug mode, large web apps (e.g. VisualEditor) load very slowly due to (serially) downloading 1000s of files in the browser. – T130782
- Remove logic that makes debug=true behave different from production mode, except for disabling minification. Still perform all the same bundling, wrapping, filtering, and concatenating.
- Use Source Maps instead to provide the raw code alongside the production code. – T47514
This request support throughout the entire stack so that offsets are maintained and may require CSSJanus and CSSMin to become parsers instead of regexp hamburgers. (Ideally we'd use a single parser and allow Less, CSSJanus and CSSMin to hook in and iterate the same tree.)