Closed robzor closed 2 years ago
Hi,
By default the plugin will look for the mix-manifest.json
inside the /web
folder...
You can change the manifest name e.g. {{ mix('/js/app.js', 'my-manifest.json') }}
, but not where the plugin is looking for it.
{
"/js/app.js": "/js/app.js?id=6b39918ec9bca033e8599fef880d0aac",
"/css/app.css": "/css/app.css?id=f7e205db9a6ebb0137acb798dabc6219"
}
Ah, ok. Is there any way the 'changed name' thing could look for a complete filepath instead of just a filename?
I will have a look to see if I can get Mix to output the manifest to a different directory but it would be great if you could add this feature, as not everyone uses the same folder structure.
Cheers!
@robzor Just to be clear, when @leowebguy says that it will look in the "/web" folder, he means whatever your webroot folder is called "public" or "public_html" etc. So you just need to make your manifest file be put into the web root. This is a pretty standard setup.
@johnwbaxter Ah yes, I am pretty new to webpack/laravel mix but I've managed to change the ouput dir of the mix-manifest without having to move the rest of my compiled assets. Thanks!
@robzor Np!
tweak the .setPublicPath()
inside your webpack.mix.js
... you can keep your files inside assets, but the plugins will look for mix-manifest.json
inside the /web
folder how's supposed to.
@leowebguy I had some issues with a SVG Sprite generation thing with the paths but managed to get it all sorted. Thanks guys :)
@leowebguy I am using web/assets folder and i can't get the manifest value in my template. if the plugin have feature to add assets folder path that would good.
Hi there,
I'm having trouble getting the plugin to find my mix-manifest.json.
On my site it is in a subfolder of web called assets, e.g.
/assets/mix-manifest.json
but I keep getting'?id=manifest-not-found'
I've tried:
{{ mix('/assets/css/global.css', '/assets/mix-manifest.json') }}
but no joy. What am I doing wrong?Thanks!