Closed mmachatschek closed 4 months ago
We'll also want to pass in the right command (build
) for the compile assets workflow: https://github.com/laravel/.github/blob/main/.github/workflows/compile-assets.yml#L9
Thanks btw! This is great.
@driesvints the default command for the compile assets workflow is production
which is available as a npm script. I'm not 100% sure I can follow what you mean.
If this gets merged, then I'll update the laravel/telescope package with the same changes too
ah nvm. We usually use build
as a default for that but it's fine: https://github.com/laravel/laravel/blob/11.x/package.json#L6
I went ahead and renamed the app.scss
and app-dark.scss
files to styles.scss
and styles-dark.scss
to avoid name conflicts.
There are basically three files now that will change behaviour on user side in the public/vendor/horizon
folder:
mix-manifest.json
-> manifest.json
-> old file not deletedapp.css
-> styles.css
-> old file not deletedapp-dark.css
-> styles-dark.css
-> old file not deletedimg/favicon.png
-> favicon.png
-> old file not deletedimg/horizon.svg
-> not deleted/no replacementimg/sprite.svg
-> not deleted/no replacementapp.js.LICENSE.txt
-> not deleted/no replacementWhen user publish the horizon assets they will end up with 3 new files and 3 old files that are not cleaned up automatically
if this is an issue, then I will need to send this PR to the 6.x branch
Let me know @driesvints
I don't think letting the old files remain is a big issue. As long as the new files are there and picked up it's fine.
So as far as I understand, is it safe to upgrade, republish assets and then manually delete these files?
mix-manifest.json
app.css
app-dark.css
img/favicon.png
This moves the current laravel mix asset bundling setup to the recommended way of bundling with Vite.