laravel-modules-com / breeze-demo

Demo breeze application using modules using Blade and Alpine version
23 stars 4 forks source link

Error/Warning on npm run build #2

Open hardiklakhalani opened 2 months ago

hardiklakhalani commented 2 months ago
λ npm run build                                                                                                       

> build                                                                                                               
> vite build                                                                                                          

vite v5.4.4 building for production...                                                                                
✓ 0 modules transformed.                                                                                              
x Build failed in 19ms                                                                                                
error during build:                                                                                                   
You must supply options.input to rollup                                                                               
    at Graph.generateModuleGraph (file:///C:/laragon/www/breeze-demo/node_modules/rollup/dist/es/shared/node-entry.js:
20141:19)                                                                                                             
    at async Graph.build (file:///C:/laragon/www/breeze-demo/node_modules/rollup/dist/es/shared/node-entry.js:20107:9)
    at async file:///C:/laragon/www/breeze-demo/node_modules/rollup/dist/es/shared/node-entry.js:20754:13             
    at async catchUnfinishedHookActions (file:///C:/laragon/www/breeze-demo/node_modules/rollup/dist/es/shared/node-en
try.js:20264:16)                                                                                                      
    at async rollupInternal (file:///C:/laragon/www/breeze-demo/node_modules/rollup/dist/es/shared/node-entry.js:20749
:5)                                                                                                                   
    at async build (file:///C:/laragon/www/breeze-demo/node_modules/vite/dist/node/chunks/dep-BEhTnQAI.js:65379:14)   
    at async CAC.<anonymous> (file:///C:/laragon/www/breeze-demo/node_modules/vite/dist/node/cli.js:828:5)

node: 18.8.0 npm: 8.18.0 php: 8.2.23

dcblogdev commented 2 months ago

hmm I don't get that on this demo, what does your vite.confi.js file look like? can you share the contents of any other js files vite may be using?

hardiklakhalani commented 2 months ago

One another PC has the same issue as well. Could you please share your vital specs/config as well?

C:\laragon\www\breeze-demo\vite.config.js

import {defineConfig} from 'vite';
import laravel from 'laravel-vite-plugin';
import collectModuleAssetsPaths from './vite-module-loader.js';

async function getConfig() {
    const paths = [];
    const allPaths = await collectModuleAssetsPaths(paths, 'Modules');

    return defineConfig({
        plugins: [
            laravel({
                input: allPaths,
                refresh: true,
            })
        ]
    });
}

export default getConfig();