Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can ClientDependency handle source maps? #161

Closed
PeteDuncanson opened this issue Mar 5, 2019 · 1 comment
Closed

Can ClientDependency handle source maps? #161

PeteDuncanson opened this issue Mar 5, 2019 · 1 comment
Labels

Comments

@PeteDuncanson
Copy link

I'd like to get the Umbraco back office to render out some source maps to ease debugging and development of the back office core code. I can add the source map generation into the Gulp build task for JS no problem however CD will then bundle those js files up again and I'm not sure if CD is source map aware to allow a browser to link the two together.

Any thoughts or points? Saying "no" is totally ok btw but would be nice to know.

@Shazwazza
Copy link
Owner

Nope. CDF's minifier is super simple, there's nothing fancy going on, it's actually very dumb... but its super fast. It doesn't build up an AST so it has no idea what code actually is.

The only thing we could try is to add functionality to CDF to tell it to not minify certain assets or bundles and just combine them. For example, if we could tell CDF, here's a bundle of core Umbraco files (which would include the JS for controllers, services, etc... ) but don't minify this bundle since the files are already done (in fact this feature is sort of requested already and we can just skip any file that is suffixed with .min.js, else this could probably also just take place within the umbraco code and cdf might not even need changing). Then you could either append your source map directly to the file, or have the file reference the external source map.

For all assets in App_Plugins, we would just minify everything like we do now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants