-
Notifications
You must be signed in to change notification settings - Fork 125
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
Upload Triggers too Early in Build Process #130
Comments
I forgot to say, if you need any additional information, or more non-Laravel Mix examples then let me know and I can expand further, and give some code examples. I wanted to keep the description brief in the first instance. |
You can fix this by using the |
Thank you for your prompt response. As mentioned, this is not relevant to just those using Laravel Mix, it just so happens that the examples I have provided are related to it. I tested out every available parameter and option before posting as I wanted to ensure I had tried everything. Not to mention, my implementation is already using the Surely just updating the event to trigger once the compilation is complete is a good thing to do regardless? |
Awesome, thanks for more info. I've merged it in and will draft a release tonight 😄 |
Thank you so much!!! :-D |
Hi Mika, Any update on the release? I can see the build is failing, is there anything I can help with? |
The tests are failing and I'm not sure why, I was inclined to think it a config on aws issue but some fail others don't, gonna try reverting and testing, if it doesn't fail we'll need to fix tests before launching this |
Okay, thanks Mika, keep me updated :-D |
I am also experiencing a similar problem. I have one JS file generated using Interestingly, when I run a 2nd time, that missing JS file is transferred properly. Also using |
Also having the exact same issue. |
OS: Windows, Mac, and Linux
Node: 10.16.3
NPM: 6.11.2
Webpack: 4.41.2
s3-webpack-plugin: 1.0.3
The Issue
Certain assets are excluded from the upload manifest due to the moment at which the S3 plugin triggers.
There are various examples I can give so I will highlight a few:
mix.scripts
,mix.styles
andmix.babel
when using Laravel MixI managed to find someone else with the same issue: https://stackoverflow.com/questions/57380123/laravel-mix-versioning-when-uploaded-in-s3-thinks-in-previous-hash
I do not believe this is limited to only those that use Laravel Mix. I assume that it is also relevant to those that manipulate their files during the webpack build process, but without using webpack to do it (i.e. it is not in the buid manifest).
I believe that the issue lies here:
s3-plugin-webpack/src/s3_plugin.js
Line 91 in 2fc4d65
Potential Solution
I am not overly familiar with webpack plugins so I can't be certain this will not break other parts of the plugin but I tried the following and it seemed to fix the issue:
compiler.hooks.done.tapPromise(packageJson.name, async(compilation) => {
I will also create a pull request.
The text was updated successfully, but these errors were encountered: