Skip to content
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

Vite compatibility #2

Closed
jan-edge opened this issue Jul 11, 2022 · 4 comments
Closed

Vite compatibility #2

jan-edge opened this issue Jul 11, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@jan-edge
Copy link

The appshell js and css is not loading with Laravel 9 Vite. The doc instructions are for Laravel Mix, but this is replaced with Vite since Laravel 9.

The following setup instructions won't work:

// webpack.mix.js
mix.js('resources/js/app.js', 'public/js')
// Add these 2 lines:
.js('vendor/konekt/appshell/src/resources/assets/js/appshell.standalone.js', 'public/js/appshell.js')
.sass('vendor/konekt/appshell/src/resources/assets/sass/appshell.sass', 'public/css')
// Keep this for the "rest" (usually public frontend)
.sass('resources/sass/app.scss', 'public/css');
@fulopattila122
Copy link
Member

No bandwidth here for this as of now (we're still using Laravel Mix), but a PR for Vite would be more than welcome 🙏

@fulopattila122 fulopattila122 added the enhancement New feature or request label Jul 25, 2022
@fulopattila122
Copy link
Member

@jan-edge this could be a great starting point: https://christoph-rumpel.com/2022/6/moving-a-laravel-webpack-project-to-vite

@yasirmturk
Copy link

+100

@fulopattila122
Copy link
Member

fulopattila122 commented Aug 31, 2022

Please be aware that Mix hasn't been completely replaced. Yes, Vite is the new default, but it has only been added to Laravel v9.19.

Mix is still there, even the doc says that there's a back and forth migration path between the two: https://laravel.com/docs/9.x/vite#vite-or-mix

Therefore, if any of you feels Vite is vital for your application, you can do it yourself; there's nothing Vanilo-specific. It's plain old SASS to CSS compilation and JS bundling, after all.

There's an official guide: https://github.com/laravel/vite-plugin/blob/main/UPGRADE.md#migrating-from-laravel-mix-to-vite and I'm also linking Christoph Rumpel's blogpost that guides you through the same: https://christoph-rumpel.com/2022/6/moving-a-laravel-webpack-project-to-vite

If you manage to migrate, it would be great if you could extend the Vanilo Documentation with Vite instructions (keeping Mix intact) and send a pull request.

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants