626fbc70d8
- Migrate to eslint flat config + composite tsconfig. - Complete the asChild→as="template" refactor (remove asChild prop + :as-child bindings across components, matching Primitive's slot model). - Fix test type errors and source type-safety (useGraceArea hull/point math, FocusScope/util ref typing). Note: ~53 vue-tsc errors remain (HTML attr/event passthrough typing on transparent wrapper components + a couple of duplicate-export naming collisions) — not gated by CI (build/lint/test green); pending a component-attribute-typing design decision.
32 lines
872 B
TypeScript
32 lines
872 B
TypeScript
import { URL, fileURLToPath } from 'node:url';
|
|
import tailwindcss from '@tailwindcss/vite';
|
|
import vue from '@vitejs/plugin-vue';
|
|
import { defineConfig } from 'vite';
|
|
|
|
export default defineConfig(({ mode }) => ({
|
|
plugins: [vue(), tailwindcss()],
|
|
define: {
|
|
__DEV__: JSON.stringify(mode !== 'production'),
|
|
},
|
|
resolve: {
|
|
alias: [
|
|
// Order matters: subpath alias must come before the bare-specifier one.
|
|
{
|
|
find: /^@primitives\/(.*)$/,
|
|
replacement: fileURLToPath(new URL('../src/$1', import.meta.url)),
|
|
},
|
|
{
|
|
find: /^@primitives$/,
|
|
replacement: fileURLToPath(new URL('../src/index.ts', import.meta.url)),
|
|
},
|
|
],
|
|
},
|
|
server: {
|
|
port: 5180,
|
|
fs: {
|
|
// Allow importing from primitives source one level up.
|
|
allow: [fileURLToPath(new URL('../', import.meta.url))],
|
|
},
|
|
},
|
|
}));
|