Filament::registerViteTheme([])
import
nnot use import statement outside a module (
vite.config.js
import { defineConfig, splitVendorChunkPlugin } from 'vite';import laravel from 'laravel-vite-plugin';export default defineConfig({ plugins: [ laravel({ input: [ 'resources/css/app.css', 'resources/js/app.js', 'resources/css/filament.css', ], refresh: true, }), splitVendorChunkPlugin(), ],build: { rollupOptions: { external: [ "../../node_modules/@types/**/*", "../../vendor/filament/forms/dist/module.esm.css", "../../vendor/filament/filament/resources/css/app.css", "../../vendor/filament/forms/dist/module.esm", "../../vendor/filament/notifications/dist/module.esm", ], output: { manualChunks(id) { if (id.includes('node_modules')) { return id.toString().split('node_modules/')[1].split('/')[0].toString(); } } } } },});
import confetti from "canvas-confetti";Livewire.on('confetti', () => { confetti({ particleCount: 80, spread: 200, origin: {y: 0.6} });})
Cannot use import statement outside a module