Closed girardinsamuel closed 3 years ago
This PR adds a mix() helper as in Laravel to easiliy include compiled mixed assets (through webpack.mix.js) in Masonite views.
mix()
webpack.mix.js
# content of mix-manifest.json {"/resources/js/app.css": "/static/app.3247864368.css"} mix("resources/js/app.css") => "http://localhost:8000/static/app.3247864368.css"
The root of the url is based on APP_URL or MIX_BASE_URL if specified. This can be useful if assets are served from a CDN.
APP_URL
MIX_BASE_URL
# .env MIX_BASE_URL=https://fastcdn.com mix("resources/js/app.css") => "https://fastcdn.com/static/app.3247864368.css"
This PR adds a
mix()
helper as in Laravel to easiliy include compiled mixed assets (throughwebpack.mix.js
) in Masonite views.Usage
The root of the url is based on
APP_URL
orMIX_BASE_URL
if specified. This can be useful if assets are served from a CDN.