Hello,
When I add a new View, corresponding script is placed in wwwroot/view-resources/Area/App/Views/ViewName/Index.js
This file is included in bundleconfig, therefore, I have to run npm run create-bundles
in background, otherwise changes in js file won't be updated.
However, whenever I save the js file, it takes about 20 seconds to rebundle the whole project. Since I'm working in js code most of the time, I have to wait a lot for my changes to be applied. Sometimes I only change a simple typing error, then rebuilding takes 20 seconds, then there is another typing error so I have to wait again and so on... this really slows down my development process.
Is there any possibility to disable or accelerate bundling/ minifying process while debugging (of course with having my js files up-to-date though)?
ASP.NET Core & jQuery, v7.0
Thanks Claus
2 Answer(s)
-
0
Hi @cbogner85,
You can use newly generatead gulpfile.js, see https://github.com/aspnetzero/aspnet-zero-core/blob/dev/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Web.Mvc/gulpfile.js
And then change the scripts in your package.json like this one https://github.com/aspnetzero/aspnet-zero-core/blob/dev/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Web.Mvc/package.json#L4-L5
You dan delete webpackconfig.js from your project.
gulpfile.js only updates the single bundle, not the entire bundles. It will take less than a second when you modify a script or style file.
-
0
Hi @ismcagdas,
it works like a charm - thank you so much!
First, I thought it wouldn't work as gulp took more than 2 minutes to finish task "buildDev" - and while (initially) running this task, it doesn't reflect changes. But after finishing the task, watching files runs perfect and instant. This saves me so much time.
Thank you again!
Cheers Claus