Level 102
Php isn't valid js and css. So vite cannot compile it
input: ['resources/js/app.js'],
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
npm run build
> build
> vite build
vite v3.2.4 building for production...
✓ 0 modules transformed.
Could not resolve entry module (resources/views/*.php).
error during build:
Error: Could not resolve entry module (resources/views/*.php).
at error (file:///home/flesh/Desktop/This/src/node_modules/vite/node_modules/rollup/dist/es/shared/rollup.js:1858:30)
at ModuleLoader.loadEntryModule (file:///home/flesh/Desktop/This/src/node_modules/vite/node_modules/rollup/dist/es/shared/rollup.js:22175:20)
at async Promise.all (index 1)
I ran npm install rollup, but it didnt help.
cat vite.config.js
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import vue from '@vitejs/plugin-vue';
export default defineConfig({
plugins: [
laravel({
input: ['resources/js/app.js', 'resources/views/*.php'],
refresh: true,
}),
vue({
template: {
transformAssetUrls: {
base: null,
includeAbsolute: false,
This is occuring on my local machine and on the server.
Php isn't valid js and css. So vite cannot compile it
input: ['resources/js/app.js'],
Please or to participate in this conversation.