What version of the packages are you using? Is this warning reproducible if you don't migrate from Mix to Vite and use Vite from the beginning, like a new Laravel app with the same packages?
Error moving from Mix to Vite
I try to switch from Mix to Vite, but now on I get the following error:
PS C:\laragon\www\vll4j> npm run build
> build
> vite build
vite v4.0.4 building for production...
transforming (19) node_modules\axios\package.json
A PostCSS plugin did not pass the `from` option to `postcss.parse`. This may cause imported assets to be incorrectly transformed. If you've recently added a PostCSS plugin that raised this warning, please contact the package author to fix the issue.
✓ 52 modules transformed.
public/build/manifest.json 0.26 kB
public/build/assets/app-5041e329.css 54.77 kB │ gzip: 9.43 kB
public/build/assets/app-fa30bb31.js 135.22 kB │ gzip: 50.66 kB
PS C:\laragon\www\vll4j>
Everything seems to be fine at first sight, but I would like to get rid of 'PostCSS'-error. Maybe it got something to do with this remark from the upgrade guide:
If you are using other PostCSS plugins, such as postcss-import, you will need to include them in your configuration. https://github.com/laravel/vite-plugin/blob/main/UPGRADE.md#optional-configure-tailwind
I added the first plugin to my postcss.config.js but it does not make a difference. The outcome is either way the same.
module.exports = {
plugins: {
'postcss-import': {},
tailwindcss: {},
autoprefixer: {},
},
}
I hope someone can help me out, because I don't know what to do. Let me know if you need more info.
@leonvr try npm update
Please or to participate in this conversation.