-
Notifications
You must be signed in to change notification settings - Fork 809
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Laravel mix is not properly updating the mix-manifest.json #283
Comments
Please have a look into this #284 issue as well. Copying a file is a separate processes from Webpack compilation and files that are not part of the bundle are not included in |
Yeah, mix.combine() is a plugin that happens after Webpack compiles. But I just pushed a commit that will manually add its output paths to your mix-manifest.json file for convenience. That way, you don't have to worry about it. |
hey @JeffreyWay that's awesome! Should I be doing it differently now with mix? |
@JeffreyWay so I updated to the latest version on github, however my manifest-json still doesn't update. |
I haven't tagged that commit yet. If you only want to combine some CSS files, and then minify them for production, you would do this: let mix = require('laravel-mix').mix;
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for your application, as well as bundling up your JS files.
|
*/
mix.combine([
'resources/assets/css/one.css',
'resources/assets/css/two.css'
], 'public/css/all.css'); With the commit that I just pushed, that will then generate this
And it will also now watch your source files for changes. |
Hmm that's what I tried but it didn't really work as the manifest stayed the same. |
I just tagged it five minutes ago.
…On Fri, Feb 3, 2017 at 3:12 PM Mikhail Levkovsky ***@***.***> wrote:
Hmm that's what I tried but it didn't really work as the manifest stayed
the same.
I'll try again in a bit and let you know.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#283 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AALLt4KprtsuyzmfRw7X0YoyOoroerfIks5rY4oWgaJpZM4L2CxQ>
.
|
dude A+ on the support and dedication. |
dude i did the same as you have mention but didnt work for me !! any idea |
@basuregami - Mine is working on my localhost, but when I push it to the server, I get this error. Any idea? |
@brada1703 could you solve it? |
@JeffreyWay today i got same problem when including the blueimp-file-upload library into my project.
and this is my mix-mainfiest.json
i'm using |
This is my mix file
`const { mix } = require('laravel-mix');
mix.js('resources/assets/js/app.js', 'public/js')
.sass('resources/assets/sass/app.scss', 'public/css');
mix.copy('resources/assets/css/styles.css', 'public/css/styles.css')`
However whenever I try to reference my styles.css folder with
<link rel="stylesheet" href="{{ mix('/css/styles.css') }}"/>
I get an error 500 saying: Unable to locate Mix file: /css/styles.css
When I check the mix-manifest.json my styles.css is not added in there. If I add it myself then everything loads fine, but since it's recreated each time I run mix, that's obviously not an option.
Thanks in advance
The text was updated successfully, but these errors were encountered: