Skip to content

Commit f04c99a

Browse files
committed
refactor: remove Vue build tooling
1 parent ea3c6bc commit f04c99a

File tree

5 files changed

+15
-198
lines changed

5 files changed

+15
-198
lines changed

package-lock.json

Lines changed: 1 addition & 177 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
"type": "module",
66
"scripts": {
77
"dev": "vite",
8-
"build": "node --run typecheck && vite build",
8+
"build": "tsc --noEmit && vite build",
99
"preview": "vite preview",
1010
"test": "vitest run",
1111
"test:watch": "vitest",
12-
"typecheck": "vue-tsc"
12+
"typecheck": "tsc --noEmit"
1313
},
1414
"dependencies": {
1515
"@andreasphil/command-bar": "github:andreasphil/command-bar#v0.5.0",
@@ -24,10 +24,8 @@
2424
"vue-router": "^4.5.1"
2525
},
2626
"devDependencies": {
27-
"@vitejs/plugin-vue": "^5.2.4",
2827
"typescript": "^5.8.3",
2928
"vite": "^6.3.5",
30-
"vitest": "^3.1.4",
31-
"vue-tsc": "^2.2.10"
29+
"vitest": "^3.1.4"
3230
}
3331
}

src/main.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import App from "@/App.vue";
1+
import App from "@/app";
22
import "@/assets/style.css";
33
import { router } from "@/router";
44
import "@/stores/settings";
@@ -13,7 +13,12 @@ dayjs.locale("de");
1313
dayjs.extend(weekday);
1414

1515
CommandBar.define();
16-
1716
Textarea2.define();
1817

19-
createApp(App).use(router).mount("#app");
18+
const app = createApp(App);
19+
app.use(router);
20+
app.mount("#app");
21+
22+
app.config.compilerOptions.isCustomElement = (tag) => {
23+
return ["textarea-2", "command-bar"].includes(tag);
24+
};

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
"strict": true,
1212
"target": "es2023"
1313
},
14-
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
14+
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx"],
1515
"references": [{ "path": "./tsconfig.node.json" }]
1616
}

vite.config.ts

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,13 @@
1-
import vue from "@vitejs/plugin-vue";
21
import { fileURLToPath, URL } from "node:url";
32
import { defineConfig } from "vite";
43

54
// https://vitejs.dev/config/
65
export default defineConfig({
7-
plugins: [
8-
vue({
9-
template: {
10-
compilerOptions: {
11-
isCustomElement: (tag) => ["command-bar", "textarea-2"].includes(tag),
12-
},
13-
},
14-
}),
15-
],
16-
176
resolve: {
187
alias: {
198
"@": fileURLToPath(new URL("./src", import.meta.url)),
20-
vue: "vue/dist/vue.esm-bundler.js",
9+
vue: "vue/dist/vue.esm-browser.prod.js",
10+
"vue-router": "vue-router/dist/vue-router.esm-browser.prod.js",
2111
},
2212
},
2313
});

0 commit comments

Comments
 (0)