feat(skeleton): T1 前端工程壳——vite5 + vue3 + TS 最小壳
build / build (push) Successful in 1m23s

- 只建壳:index.html / src/main.ts / src/App.vue(占位)/ src/env.d.ts / vite.config.ts / tsconfig{,.node}.json / .npmrc / .gitignore
- base="./"(同 notice / flow-center 口径),保证 projman /form-center/ 挂载下静态资源可取;dev 端口 8089
- package-lock.json 入库:CI 走 npm ci,无锁即红
- typescript 5.2.2 + vue-tsc 1.8.27 锁死配对(^5.2.2 会解析到 5.9,vue-tsc 1.8 直接崩在 supportedTSExtensions patch)
- 自验:npm run build 过、npm run type-check 无报错
- 平台约定(A 类 loader / view-ui-plus 1.3.24 / alova / router / layout)留 T5 落地
This commit is contained in:
chenxing
2026-10-14 12:21:19 +08:00
parent fd28372b69
commit cebc32fbef
11 changed files with 1517 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
node_modules/
dist/
.DS_Store
*.local
.vite/
# Logs
*.log
+1
View File
@@ -0,0 +1 @@
registry =https://registry.npmmirror.com
+12
View File
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>表单中心</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
+1409
View File
File diff suppressed because it is too large Load Diff
+22
View File
@@ -0,0 +1,22 @@
{
"name": "form-center-front",
"private": true,
"version": "0.0.0",
"nodeversion": "20.19.4",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"type-check": "vue-tsc --noEmit",
"preview": "vite preview"
},
"dependencies": {
"vue": "^3.4.19"
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.0.4",
"typescript": "5.2.2",
"vite": "^5.1.4",
"vue-tsc": "1.8.27"
}
}
+15
View File
@@ -0,0 +1,15 @@
<template>
<main class="shell-placeholder">
<h1>表单中心</h1>
<p>工程壳已就绪(T1)。管理端框架、设计器与填报页在 T5~T8 落地。</p>
</main>
</template>
<script setup lang="ts"></script>
<style scoped>
.shell-placeholder {
font-family: system-ui, -apple-system, "Microsoft YaHei", sans-serif;
padding: 24px;
}
</style>
+1
View File
@@ -0,0 +1 @@
/// <reference types="vite/client" />
+4
View File
@@ -0,0 +1,4 @@
import { createApp } from "vue";
import App from "./App.vue";
createApp(App).mount("#app");
+18
View File
@@ -0,0 +1,18 @@
{
"compilerOptions": {
"target": "ES2020",
"useDefineForClassFields": true,
"module": "ESNext",
"moduleResolution": "Bundler",
"strict": true,
"jsx": "preserve",
"resolveJsonModule": true,
"isolatedModules": true,
"esModuleInterop": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"skipLibCheck": true,
"noEmit": true
},
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
"references": [{ "path": "./tsconfig.node.json" }]
}
+10
View File
@@ -0,0 +1,10 @@
{
"compilerOptions": {
"composite": true,
"skipLibCheck": true,
"module": "ESNext",
"moduleResolution": "Bundler",
"allowSyntheticDefaultImports": true
},
"include": ["vite.config.ts"]
}
+17
View File
@@ -0,0 +1,17 @@
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
// T1 只做工程壳(CI 的 npm ci + npm run build 必须过)。
// T5 fork notice/front 时在此接入 A 类 loader、auto-import、svg icons、dev proxy 等平台约定。
export default defineConfig({
// 相对路径产物:静态资源在 projman 的 /form-center/ 挂载下也能取到(同 notice / flow-center 口径)
base: "./",
plugins: [vue()],
build: {
outDir: "dist"
},
server: {
// 本地 dev 端口(后端 8086;8077=notice front、8087=svc-hall front、8088=flow-center front 顺延)
port: 8089
}
});