Files
wehub-resource-sync 3a28426bf4
Lint and Format Check / lint-and-format (push) Failing after 0s
Check Migrations / Check for duplicate migration numbers (push) Failing after 1s
CI Pre-merge Check / CI Pre-merge Check (push) Failing after 2m17s
chore: import upstream snapshot with attribution
2026-07-13 12:23:40 +08:00

42 lines
1.4 KiB
TypeScript

import path from 'node:path';
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import svgr from 'vite-plugin-svgr';
import tailwindcss from '@tailwindcss/vite';
const dashboardSrcPath = path.resolve(__dirname, 'src');
export default defineConfig({
plugins: [react(), tailwindcss(), svgr()],
resolve: {
alias: {
'#app': path.resolve(dashboardSrcPath, 'app'),
'#assets': path.resolve(dashboardSrcPath, 'assets'),
'#components': path.resolve(dashboardSrcPath, 'components'),
'#features': path.resolve(dashboardSrcPath, 'features'),
'#layout': path.resolve(dashboardSrcPath, 'layout'),
'#lib': path.resolve(dashboardSrcPath, 'lib'),
'#navigation': path.resolve(dashboardSrcPath, 'navigation'),
'#router': path.resolve(dashboardSrcPath, 'router'),
'#types': path.resolve(dashboardSrcPath, 'types'),
'@insforge/shared-schemas': path.resolve(__dirname, '../shared-schemas/src'),
'@insforge/ui': path.resolve(__dirname, '../ui/src'),
},
},
build: {
lib: {
entry: path.resolve(__dirname, 'src/index.ts'),
formats: ['es'],
fileName: () => 'index.js',
},
cssCodeSplit: false,
rollupOptions: {
external: ['react', 'react-dom'],
output: {
assetFileNames: (assetInfo) =>
assetInfo.name?.endsWith('.css') ? 'styles.css' : 'assets/[name]-[hash][extname]',
},
},
},
});