Add the floowing so all can be a module in package.json
{
"type": "module",
...
Add all necessary packages to package.json
, for example:
{
"type": "module",
"devDependencies": {
"@inertiajs/inertia": "^0.11.0",
"@inertiajs/inertia-svelte": "^0.8.0",
"@inertiajs/progress": "^0.2.7",
"@sveltejs/vite-plugin-svelte": "^1.0.1",
"axios": "^0.27.2",
"daisyui": "^2.22.0",
"svelte": "^3.47.0",
"svelte-i18n": "^3.4.0",
"svelte-preprocess": "^4.10.7",
"tailwindcss": "^3.1.8",
"typescript": "^4.7.4",
"vite": "^3.0.4",
"vite-plugin-full-reload": "^1.0.0",
"vite-plugin-ruby": "^3.1.2"
}
}
Rename your postcss.config.js
to postcss.config.cjs
as well as your tailwind.config.js
to tailwind.config.cjs