You can stop NitroPack from performing specific operations on a resource with the “Excluded Operations” feature.

These operations are:

Optimize

This operation is resource-specific. For code files (JavaScript or CSS), optimization includes actions like minification. For images, these actions are different - compression, resizing, etc.

Stopping this operation ensures that the resource won’t be optimized. For example, code files won’t be minified and images won’t be resized.

But our resource loader will still recognize these resources. They’ll remain in the loading sequence that NitroPack uses to speed up the rendering process.

Minify

Minifying CSS and JS files means removing unnecessary data like whitespace, comments and line-breaks. This reduces their size, making them easier to download.

Stopping this operation will keep the dispensable data in your code files.

To learn more about code minification, check out our article on the topic.

Combine

This operation combines CSS/JS files into fewer but larger CSS/JS files. That way, the browser has to make fewer network requests, reducing network overhead.

By stopping this operation, the specified code files will remain separate. In some cases, keeping them separate could help fix unexpected behavior.

To learn more about code concatenation, check out our article on the topic.

Render Blocking Fix

This operation ensures that resources are loaded in a specific way that improves performance.

If you exclude it, the resource will be loaded without NitroPack’s resource loader.

But the resource itself will still be optimized. For example, code files will be minified and images - resized.

Resize

Resizing images makes sure they fit their containers and reduces their file size.

Excluding this operation will ensure that the specified image isn’t resized.

Did this answer your question?