How to manage ASP.NET Core bundleconfig.json for multiple environments?

前端 未结 3 1750
无人共我
无人共我 2021-01-02 11:41

What\'s the best practice for using the ASP.NET Core bundleconfig.json with development versus production environments? The prior bundler (BundleCollection) wou

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-02 12:34

    Im with Josh on this one, seems like madness having to maintain two lists. Has anybody come back with a better build in solution without using a MvcHtmlString helper!

    "sourceMap": true

    This enables debugging into your js in if enabled in the bundleconfig.json but I have noticed if you are going bundling it does not generate the maps correctly, references the combined and the each mapped file...

    Smidge seems to provide this functionality - with a simple flag - debug="true"

    
        
    
    
        
    

    Webpack or gulp is the way to go - which one, that`s debatable.

提交回复
热议问题