-
Notifications
You must be signed in to change notification settings - Fork 0
Upgrade from Laravel Mix to Vite #205
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
base: develop
Are you sure you want to change the base?
Conversation
7ac0c02 to
02096df
Compare
…urcemaps only available in dev mode The build.sourcemap option generates sourcemaps for JavaScript but not for CSS. This is a known Vite limitation that doesn't impact how Vite is designed to work, but it slightly affects our current workflow—the Vite dev server is required to use CSS sourcemaps for debugging styles. When changes are ready for deploy, use npm run build to compile and commit the assets.
Add the `vite-plugin-css-sourcemap plugin` to generate CSS sourcemaps during production builds and include it in compiled assets. Requires downgrading to Vite 6 and laravel-vite-plugin 1.x due to plugin compatibility constraints. With this change, `npm run build` generates both JS and CSS sourcemaps, eliminating the need to run the dev server for CSS debugging.
|
@wunc Vite serves assets from a local dev server during development and only compiles them for production. CSS sourcemaps are a known limitation—the
|
|
@betsyecastro thanks for the analysis. It's very helpful. Seeing this, I think I'd rather upgrade to the newer version (7) right now, and we'll adjust how we work in dev. |
This reverts commit f7a6173.
Uh oh!
There was an error while loading. Please reload this page.