Laravel Mix integration for AdonisJS, providing asset bundling with webpack and a view helper. Current stable version is 3.0.0, requiring @adonisjs/core ^5.1.7, @adonisjs/view ^6.0.2, and laravel-mix ^6.0.19. It simplifies using Laravel Mix's webpack configuration within AdonisJS, offering commands for building, watching, and analyzing assets. Differentiators include automatic mix-manifest.json parsing and a view helper for cache-busted asset URLs.
npm install adonis-mix-assetVerified import paths — ran on the pinned version, not inferred.
Install the package and configure it using AdonisJS ace command.
Upgrade to AdonisJS v5.1.7+ and install @adonisjs/view v6.0.2+.
Ensure mix.setPublicPath('public') matches the AdonisJS public path config.Prefix with NODE_ENV=production or use cross-env.
Run node ace mix:build or node ace mix:watch after configuration.
Add 'mix-manifest.json', 'public/scripts', 'public/styles' to .gitignore.
Upgrade AdonisJS to ^5.1.7 and use adonis-mix-asset v3.
Change to const mix = require('laravel-mix');Ensure mix.setPublicPath('public') matches your AdonisJS public directory.Run node ace configure adonis-mix-asset again and ensure the provider is in .adonisrc.json.