Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Fix inspection functionality not working for Vue devtools #689

Merged
merged 3 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 37 additions & 34 deletions refarch-frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,41 +8,44 @@ import vueDevTools from "vite-plugin-vue-devtools";
import vuetify, { transformAssetUrls } from "vite-plugin-vuetify";

// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue({
template: { transformAssetUrls },
features: {
optionsAPI: false,
export default defineConfig(({ mode }) => {
const isDevelopment = mode === "development";
return {
plugins: [
vue({
template: { transformAssetUrls },
features: {
optionsAPI: isDevelopment,
},
}),
vuetify({
autoImport: false,
}),
UnpluginFonts({
fontsource: {
families: [
{
name: "Roboto",
weights: [100, 300, 400, 500, 700, 900],
subset: "latin",
},
],
},
}),
vueDevTools(),
],
server: {
host: true,
port: 8081,
proxy: {
"/api": "http://localhost:8083",
"/actuator": "http://localhost:8083",
},
}),
vuetify({
autoImport: false,
}),
UnpluginFonts({
fontsource: {
families: [
{
name: "Roboto",
weights: [100, 300, 400, 500, 700, 900],
subset: "latin",
},
],
},
}),
vueDevTools(),
],
server: {
host: true,
port: 8081,
proxy: {
"/api": "http://localhost:8083",
"/actuator": "http://localhost:8083",
},
},
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
},
},
},
};
});
24 changes: 13 additions & 11 deletions refarch-frontend/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,19 @@ import { defineConfig, mergeConfig } from "vitest/config";

import viteConfig from "./vite.config";

export default mergeConfig(
viteConfig,
defineConfig({
test: {
environment: "jsdom",
root: fileURLToPath(new URL("./", import.meta.url)),
server: {
deps: {
inline: ["vuetify"],
export default defineConfig((configEnv) =>
mergeConfig(
viteConfig(configEnv),
defineConfig({
test: {
environment: "jsdom",
root: fileURLToPath(new URL("./", import.meta.url)),
server: {
deps: {
inline: ["vuetify"],
},
},
},
},
})
})
)
);
67 changes: 35 additions & 32 deletions refarch-webcomponent/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,44 @@ import { defineConfig } from "vite";
import vueDevTools from "vite-plugin-vue-devtools";

// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vue({
features: {
customElement: true,
optionsAPI: false,
export default defineConfig(({ mode }) => {
const isDevelopment = mode === "development";
return {
plugins: [
vue({
features: {
customElement: true,
optionsAPI: isDevelopment,
},
}),
vueDevTools(),
],
server: {
port: 8082,
proxy: {
"/api": "http://localhost:8083",
"/actuator": "http://localhost:8083",
"/clients": "http://localhost:8083",
},
}),
vueDevTools(),
],
server: {
port: 8082,
proxy: {
"/api": "http://localhost:8083",
"/actuator": "http://localhost:8083",
"/clients": "http://localhost:8083",
},
},
resolve: {
dedupe: ["vue"],
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
},
},
build: {
manifest: true, // required for post build logic in 'processes' folder
rollupOptions: {
input: {
"refarch-hello-world-webcomponent":
"./src/refarch-hello-world-webcomponent.ts",
resolve: {
dedupe: ["vue"],
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
},
output: {
entryFileNames: "entry-[name]-[hash].js",
dir: "dist/src",
},
build: {
manifest: true, // required for post build logic in 'processes' folder
rollupOptions: {
input: {
"refarch-hello-world-webcomponent":
"./src/refarch-hello-world-webcomponent.ts",
},
output: {
entryFileNames: "entry-[name]-[hash].js",
dir: "dist/src",
},
},
},
},
};
});
18 changes: 10 additions & 8 deletions refarch-webcomponent/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ import { defineConfig, mergeConfig } from "vitest/config";

import viteConfig from "./vite.config";

export default mergeConfig(
viteConfig,
defineConfig({
test: {
environment: "jsdom",
root: fileURLToPath(new URL("./", import.meta.url)),
},
})
export default defineConfig((configEnv) =>
mergeConfig(
viteConfig(configEnv),
defineConfig({
test: {
environment: "jsdom",
root: fileURLToPath(new URL("./", import.meta.url)),
},
})
)
);
Loading