package.json
{
"name": "askme",
"version": "0.0.0",
"private": true,
"scripts": {
"dev": "vite --port 8082",
"build": "vue-tsc --noEmit && vite build --mode homologacao",
"homologacao": "vue-tsc --noEmit && vite build --mode homologacao",
"preview": "vite preview --port 5050",
"typecheck": "vue-tsc --noEmit",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore"
},
"dependencies": {
"vfonts": "^0.0.3",
"vue": "3.2.31",
"vue-router": "^4.1.6",
"keycloak-js": "^20.0.3"
},
"devDependencies": {
"@playwright/test": "^1.28.1",
"@rushstack/eslint-patch": "^1.1.4",
"@types/jsdom": "^20.0.1",
"@types/node": "^18.11.12",
"vite-plugin-vuetify": "1.0.2",
"@vitejs/plugin-vue": "^4.0.0",
"@vitejs/plugin-vue-jsx": "^3.0.0",
"@vue/eslint-config-prettier": "^7.0.0",
"@vue/eslint-config-typescript": "^11.0.0",
"@vue/test-utils": "^2.2.6",
"@vue/tsconfig": "^0.1.3",
"eslint": "^8.22.0",
"eslint-plugin-vue": "^9.3.0",
"jsdom": "^20.0.3",
"npm-run-all": "^4.1.5",
"prettier": "^2.7.1",
"typescript": "~4.7.4",
"vite": "4.1.1",
"vue-tsc": "^1.0.12"
}
}
vite.config.ts
import vue from "@vitejs/plugin-vue";
import { fileURLToPath, URL } from "url";
import { defineConfig } from "vite";
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
},
},
define: {
"process.env": {},
},
css: {
preprocessorOptions: {
scss: {},
},
},
optimizeDeps: {
exclude: ["vuetify"],
entries: ["./src/**/*.vue"],
},
});
tsconfig.vite-config.json
{
"extends": "@vue/tsconfig/tsconfig.node.json",
"include": ["vite.config.*"],
"compilerOptions": {
"composite": true,
"allowJs": true,
"types": ["node"]
}
}
tsconfig.json
{
"extends": "@vue/tsconfig/tsconfig.web.json",
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
"compilerOptions": {
"outDir": "dist",
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
},
"allowJs": true,
"types": ["node", "vite/client"],
"target": "ESNext"
},
"references": [
{
"path": "./tsconfig.vite-config.json"
}
]
}
Acontece este erro:
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of “text/html”. Strict MIME type checking is enforced for module scripts per HTML spec.
O que pode ser ?