Versioning
To keep the FrontHub ecosystem healthy, reliable, and secure, each microfrontend is built with version linked to the filename, which allows you to use aggressive caching techniques to avoid the browser re-downloading your assets if the file contents haven't changed.
Versioning is done through the version
property in the package.json
of the microfrontend, we recommend that you follow the semantic versioning spec.
You can manually version each deployment, but FrontHub can do that automatically.
Automatic versioning
To enable automatic versioning, just define it in the front-hub.config.js
:
module.exports = {
// ...
version: 'auto',
}
The user who will commit the new version to the deployment system must have access to the main branch of the microfronted repository.
For now, only the PATCH number will be added to each deployment for production, if you want to change another number it must be done manually. This evolution can be followed in the issue #401.
Any deployment that is not in production the bundle will be versioned as prerelease using the hash of the last commit, but no changes will be made to package.json
.