Masonite Inertia
4.X
4.X
  • Introduction
  • Installation
  • Demo app
  • The basics
    • Routing
    • Responses
    • Redirects
    • Validation
    • Shared data
    • File uploads
  • Advanced
    • Configuration
    • Root view
    • Partial reloads
    • Authorization
    • CSRF protection
    • Error handling
    • Assets versioning
    • Server-side rendering
    • Testing
  • Development
    • Changelog
    • Contribute
    • Support
Powered by GitBook
On this page
  • Global configuration via middleware
  • On-the-fly configuration

Was this helpful?

  1. Advanced

Assets versioning

PreviousError handlingNextServer-side rendering

Last updated 3 years ago

Was this helpful?

By default masonite-inertia adapter will compute sensible version based on a hash of the compiled assets declared in webpack.mix.js.

You can override this behaviour to provide your own logic to compute assets version when they change. This can be any string (letters, numbers, or a file hash), as long as it changes when your assets have been updated.

Global configuration via middleware

The version() method can be overriden in .

On-the-fly configuration

You can resolve inertia instance from the container and then call the version() method.

application.make("inertia").version("123")

# a callable can be provided too

def compute_version():
    return "123"

application.make("inertia").version(compute_version)
custom inertia middleware