laravel-modules
laravel-modules copied to clipboard
vite configuration guide
Hello, a small guide for vite with the "nwidart/laravel-modules" package.
- edit package.json

- Modules\User\Resources\assets\js\app.js add "import './bootstrap';".
- Modules\User\Resources\assets\js\bootstrap.js

- Modules\User\Resources\assets\sass\app.scss (optional variables)

- Modules\User\Resources\views\layouts\master.blade.php (I recommend that you make helper, for cleaner code :) )

- Modules\User\vite.config.js (I have found 4 ways, but this is the best example I think.), "Omit those in red box".

- Modules\User\webpack.mix.js (Delete webpack.mix.js )
- Thank you for your attention, hoping you will accept the merge. https://github.com/nWidart/laravel-modules/pull/1455 @dcblogdev @kylecmccandless
I assume your adding this bootstrap code here as a POC? Laravel has taken tailwind as its primary CSS framework and for compatibility I would suggest sticking with tailwind. Do you have a way to build all from the root vite file as to not have to run npm build in an undetermined number of modules? In a CI pipeline this would be a huge pain.
@wikigods @dcblogdev
Cool @wikigods but why images ? not a plain text ? :D
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.