Files
vame 7f0f79420c feat(front-end): 初始化STP前端工程并提交页面框架
引入前端项目基础结构、页面骨架和UI组件,建立可运行的开发与构建配置,方便后续按模块迭代。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-22 14:25:22 +08:00

37 lines
926 B
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { defineConfig } from 'vite'
import path from 'path'
import tailwindcss from '@tailwindcss/vite'
import react from '@vitejs/plugin-react'
function figmaAssetResolver() {
return {
name: 'figma-asset-resolver',
resolveId(id) {
if (id.startsWith('figma:asset/')) {
const filename = id.replace('figma:asset/', '')
return path.resolve(__dirname, 'src/assets', filename)
}
},
}
}
export default defineConfig({
plugins: [
figmaAssetResolver(),
// The React and Tailwind plugins are both required for Make, even if
// Tailwind is not being actively used do not remove them
react(),
tailwindcss(),
],
resolve: {
alias: {
// Alias @ to the src directory
'@': path.resolve(__dirname, './src'),
},
},
// File types to support raw imports. Never add .css, .tsx, or .ts files to this.
assetsInclude: ['**/*.svg', '**/*.csv'],
})