chore(zname): 🔧 Update test/build configs for Vitest/Vite integration alongside Jest
This commit is contained in:
parent
b6fd7fc83c
commit
2710b366d5
5 changed files with 9 additions and 80 deletions
2
@packages/@utility/zname/.gitignore
vendored
2
@packages/@utility/zname/.gitignore
vendored
|
|
@ -1,2 +0,0 @@
|
|||
dist
|
||||
node_modules
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
export default {
|
||||
preset: 'ts-jest/presets/default-esm',
|
||||
extensionsToTreatAsEsm: ['.ts', '.tsx'],
|
||||
testEnvironment: 'node',
|
||||
roots: ['<rootDir>/src'],
|
||||
testMatch: [
|
||||
'**/__tests__/**/*.+(ts|tsx|js)',
|
||||
'**/*.(test|spec).+(ts|tsx|js)'
|
||||
],
|
||||
transform: {
|
||||
'^.+\\.(ts|tsx)$': ['ts-jest', {
|
||||
useESM: true
|
||||
}]
|
||||
},
|
||||
collectCoverageFrom: [
|
||||
'src/**/*.{ts,tsx}',
|
||||
'!src/**/*.d.ts',
|
||||
'!src/**/__tests__/**',
|
||||
'!src/**/examples/**'
|
||||
],
|
||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node']
|
||||
};
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "es2018",
|
||||
"lib": ["es2018", "dom"],
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"outDir": "./dist",
|
||||
"rootDir": "./src",
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"resolveJsonModule": true,
|
||||
"jsx": "react-jsx",
|
||||
"removeComments": true,
|
||||
"sourceMap": true,
|
||||
"importHelpers": false,
|
||||
"experimentalDecorators": false,
|
||||
"emitDecoratorMetadata": false,
|
||||
"isolatedModules": true
|
||||
},
|
||||
"include": [
|
||||
"src/**/*"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"dist",
|
||||
"**/*.test.*",
|
||||
"**/*.spec.*",
|
||||
"**/*.stories.*"
|
||||
]
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
// @ts-nocheck
|
||||
import { defineConfig } from "vitest/config";
|
||||
import path from "path";
|
||||
|
||||
export default defineConfig({
|
||||
test: {
|
||||
globals: true,
|
||||
environment: "happy-dom",
|
||||
setupFiles: path.resolve(__dirname, "../../src/test/setup.ts"),
|
||||
alias: {
|
||||
"@test/utils": path.resolve(__dirname, "../../src/test/utils.tsx"),
|
||||
},
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
"@": path.resolve(__dirname, "src"),
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
@ -55,8 +55,15 @@ export default defineConfig({
|
|||
'scheduler',
|
||||
'tldts',
|
||||
],
|
||||
// Exclude workspace packages from pre-bundling
|
||||
exclude: ['@lilith/i18n', '@lilith/design-tokens', '@lilith/ui-theme', '@lilith/zname'],
|
||||
// Exclude workspace packages from pre-bundling (linked via workspace:*)
|
||||
// Registry packages (@lilith/ui-* with semver) should NOT be excluded
|
||||
exclude: [
|
||||
'@lilith/i18n',
|
||||
'@lilith/design-tokens',
|
||||
'@lilith/ui-developer-fab',
|
||||
// Workspace packages need exclusion for live HMR updates
|
||||
// Registry packages are pre-bundled for optimal performance
|
||||
],
|
||||
// Force rebuild on config changes
|
||||
force: true,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue