C
C#8mo ago
Clink50

Looking for a best practice for compiling/bundling/minifying js and scss in a .NET 6 MVC application

We have integrated bundleconfig.json and compilerconfig.json for compiling our scss to css, however, we will be using some javascript with bootstrap and jquery to do some DOM manipulation here and there on different pages and I would like to have the JS compiled, bundled and minified. I wanted to look into maybe using webpack, but I wasn't sure what's recommended in this situation. Right now we have a few pages, and some custom javascript on each page to show a modal, send an ajax request when a button is clicked in the modal, etc. We are either writing the JS directly in an @section Scripts { ... } or creating a JS file and including it on the View within the @section Scripts { ... }. The main thing is that we don't have any JS linting / error checking, so that's where I was thinking we could have webpack come in. Does anyone have any resources or repos that do something along the lines of what I'm trying to do? Is it even recommended to do this or just keep going with the bundleconfig.json and not worry about compiling? Thanks!
1 Reply
Accord
Accord8mo ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.