![]() Open this new Sass file and copy the following: /* Please see documentation at \įor details on configuring this project to bundle and minify static web assets. Inside it, create a Sass file and name it site.scss. Creating the projectĬreate a Styles folder within the root of the project. I’m naming my project netcore-sass-webpack. Open Visual Studio and create a new ASP.NET Core Web Application, then select Web Application (Model-View-Controller). You would just need to modify the Webpack configuration a little bit to output the CSS file to the Content directory. NET Core MVC app, but the same principles apply to any ASP.NET MVC app. You’ll also need npm, but it will also be installed with Node. You will need to have Node installed, and you can grab it here. Also, vendor prefixes will be added automatically to your CSS rules. This is the case with one of the most popular compiler plug-ins on the market.īy configuring the compilation yourself, you will have total control over the output. Note Your computer might show different names or locations for some of the Visual Studio user interface elements in this article. When the Project Designer appears, click the Compile tab. ![]() Then choose Project, Properties on the menu bar. But what happens if the plug-in is not supported anymore and stops working with newer Visual Studio versions? Well, too bad. To access the Compile page, choose a project node (not the Solution node) in Solution Explorer. Sure, there are some plug-ins in the Visual Studio Marketplace, and it can be nice to just install a plug-in and forget about configuration. Our discussion will include minification and autoprefixing for production. The intent of this tutorial is to show you how to compile Sass files within Visual Studio using Webpack. Sass is a very popular CSS pre-processor. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |