build: fix build and add examples

This commit is contained in:
2025-02-05 23:55:00 +08:00
parent f00c1d1aef
commit 58d7b3c89e
127 changed files with 1340 additions and 3841 deletions

View File

@@ -10,20 +10,23 @@ export default defineConfig({
include: ['src/**/*.spec.ts'],
globals: true,
restoreMocks: true,
// browser: {
// provider: 'playwright', // or 'webdriverio'
// enabled: true,
// instances: [{ browser: 'chromium' }],
// },
coverage: {
// you can include other reporters, but 'json-summary' is required, json is recommended
reporter: ['text', 'json-summary', 'json'],
// If you want a coverage reports even if your tests are failing, include the reportOnFailure option
reportOnFailure: true,
},
},
plugins: [
tsconfigPaths(),
swc.vite({
include: /\.[mc]?[jt]sx?$/,
// for git+ package only
exclude: [
/node_modules\/(?!injection-js|\.pnpm)/,
/node_modules\/\.pnpm\/(?!injection-js)/,
/node_modules\/(?!injection-js|@outposts\/injection-js|\.pnpm)/,
/node_modules\/\.pnpm\/(?!injection-js|@outposts\/injection-js)/,
] as any,
tsconfigFile: './tsconfig.spec.json',
}),
],
});