feat: 骨架——Vite + Vue3 + Fabric v7,左工作区右侧栏
共享外壳与类型契约,四条并行开发线在此之上各自填空: - types.ts 是唯一的跨线接口,并行期间冻结 - editor/ 画布单例、选中态、尺寸预设与比例锁 - Sidebar 按选中对象切换面板,五个面板位已接好 - fonts/ filters/ sources/ io/ 留桩,各线只改自己目录 导出定 WebP:实测 540x287 PNG 134KB vs 1200x630 WebP 23KB。 字体接口挂在 Vite 中间件上,工具只在 dev 下完整可用。
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import { fileURLToPath, URL } from "node:url";
|
||||
import { defineConfig } from "vite";
|
||||
import vue from "@vitejs/plugin-vue";
|
||||
import { fontsPlugin } from "./src/fonts/vite-plugin-fonts";
|
||||
|
||||
/**
|
||||
* 这个工具**只在 dev 下完整可用**:系统字体的枚举与读取走 `fontsPlugin` 挂在 Vite
|
||||
* 开发服务器上的中间件,`vite build` 出的静态产物里没有那两个接口。
|
||||
* 这是刻意的——自用工具不值得为此单起一个后端进程。
|
||||
*/
|
||||
export default defineConfig({
|
||||
plugins: [vue(), fontsPlugin()],
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": fileURLToPath(new URL("./src", import.meta.url)),
|
||||
},
|
||||
},
|
||||
server: {
|
||||
port: 5180,
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user