Optimization

Bundling & Minification

In GrandNode v2 you are able to combine every JS and CSS file that is available in your project. Furthermore, this process is automated and made during the build process. So the server is not responsible for generating these files which will significantly increase performance.

Bundling and minification are covered by BuildBundlerMinifier - to configure it, you should look into the bundleconfig.json file. It contains every file that should be bundled and minified.

Our bundling mechanism allows you to choose the file that should be loaded in a specified environment - the development or Production one. 

The usage is super simple, and to be honest, it's currently implemented in our project. Just check the Head.cshtml file.

How to bundle & minify resources directly on the server?

Just install the required bundler with the following command -

dotnet tool install --global BundlerMinifier.Core.Tool --version 4.4.6

After that, you will be able to create new bundle with bundle command.