Map Preprocessed Code to Supply Code For Your NeedsJaroco
Keep your client-side code debuggable and readable even with you have combined, minified or put together it. Utilize supply maps to map your supply rule to your put together rule.
- Utilize supply Maps to map minified rule to supply rule. Then you can read and debug put together rule with its initial source.
- Only utilize preprocessors effective at creating supply Maps.
- Verify that the web host can provide supply Maps.
Begin with preprocessors
Make use of supported preprocessor
You should employ a minifier that is with the capacity of creating source maps. For the many options that are popular see our preprocessor help part. For an view that is extended look at supply maps: languages, tools as well as other information wiki page.
The next types of preprocessors are generally found in combination with Source Maps:
Supply Maps in DevTools Sources panel
Source Maps from preprocessors cause DevTools to load your initial files as well as your ones that are minified. Afterward you make use of the originals to create breakpoints and move through code. Meanwhile, Chrome is clearly running your minified rule. Thus giving you the impression of more info here running a development web site in production.
Enable Source Maps in settings
Debugging with Source Maps
When debugging your rule and Source Maps enabled, supply Maps will show in 2 places:
- Within the system (the hyperlink to supply ought to be the initial file, maybe perhaps not the one that is generated
- Whenever stepping through rule (backlinks when you look at the call stack should start the initial source file)
Whilst not the main Source Map spec, the @sourceURL permits you to produce development less difficult whenever using evals. This helper appears much the same in to the //# sourceMappingURL property and it is really mentioned when you look at the Source Map V3 specifications.
By like the after special comment in your rule, that will be evaled, it is possible to name evals and inline scripts and designs so that they appear much more rational names in your DevTools.
Navigate to the demo, then:
- Start the DevTools and go right to the Sources panel.
- Type in a filename in to the title your rule: input industry.
- Go through the compile switch.
- An alert will appear with the evaluated sum from the CoffeeScript supply.