How to add js and css files in ASP.net Core?

前端 未结 5 1165
日久生厌
日久生厌 2020-12-29 23:44

I\'ve been assigned to migrate an application from MVC into ASP.net Core, I\'m new to ASP.net Core. In MVC we have BundleConfig.cs and in there we add reference

5条回答
  •  醉话见心
    2020-12-29 23:55

    I put the JS and CSS files in an assets folder in the wwwroot folder of my application and then used link tags in my _Layout.cshtml to bring in the styles. Steven Sanderson has part a of a blog post where he talks about adding third party libraries here.

    You could also do some sort of setup using webpack. I admit, this topic is not very straight forward.

提交回复
热议问题