@icebreakers/monorepo 1.2.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/package.json +2 -2
- package/dist/{chunk-EBATUF3S.js → chunk-SC5QBYJ5.js} +1 -1
- package/dist/cli.cjs +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/templates/apps/cli/bin/index.js +2 -0
- package/templates/apps/cli/dev/index.ts +2 -0
- package/templates/apps/cli/package.json +32 -0
- package/templates/apps/cli/src/cli.ts +3 -0
- package/templates/apps/cli/src/index.ts +0 -0
- package/templates/apps/cli/tsconfig.json +7 -0
- package/templates/apps/cli/tsup.config.ts +13 -0
- package/templates/apps/client/eslint.config.js +12 -0
- package/templates/apps/client/index.html +13 -0
- package/templates/apps/client/package.json +44 -0
- package/templates/apps/client/public/vite.svg +1 -0
- package/templates/apps/client/src/App.vue +9 -0
- package/templates/apps/client/src/main.ts +14 -0
- package/templates/apps/client/src/pages/index.vue +67 -0
- package/templates/apps/client/src/router/index.ts +13 -0
- package/templates/apps/client/src/stores/i18n.ts +23 -0
- package/templates/apps/client/src/stores/index.ts +15 -0
- package/templates/apps/client/src/style.css +1 -0
- package/templates/apps/client/src/trpc/index.ts +10 -0
- package/templates/apps/client/src/vite-env.d.ts +2 -0
- package/templates/apps/client/tsconfig.app.json +28 -0
- package/templates/apps/client/tsconfig.json +8 -0
- package/templates/apps/client/tsconfig.node.json +25 -0
- package/templates/apps/client/tsconfig.worker.json +11 -0
- package/templates/apps/client/vite.config.ts +40 -0
- package/templates/apps/client/worker/app.ts +24 -0
- package/templates/apps/client/worker/config.ts +1 -0
- package/templates/apps/client/worker/fetch-entry.ts +5 -0
- package/templates/apps/client/worker/node-entry.ts +12 -0
- package/templates/apps/client/worker/trpc-router.ts +24 -0
- package/templates/apps/client/worker-configuration.d.ts +7688 -0
- package/templates/apps/client/wrangler.jsonc +21 -0
- package/templates/apps/server/package.json +58 -0
- package/templates/apps/server/src/app.ts +191 -0
- package/templates/apps/server/src/config.ts +1 -0
- package/templates/apps/server/src/fetch-entry.ts +5 -0
- package/templates/apps/server/src/node-entry.ts +12 -0
- package/templates/apps/server/test/index.test.ts +14 -0
- package/templates/apps/server/tsconfig.json +24 -0
- package/templates/apps/server/tsup.config.ts +13 -0
- package/templates/apps/server/vitest.config.ts +15 -0
- package/templates/apps/server/worker-configuration.d.ts +7688 -0
- package/templates/apps/server/wrangler.jsonc +18 -0
- package/templates/apps/website/.vitepress/config.ts +93 -0
- package/templates/apps/website/.vitepress/theme/index.ts +4 -0
- package/templates/apps/website/.vitepress/theme/tailwind.css +1 -0
- package/templates/apps/website/index.md +151 -0
- package/templates/apps/website/monorepo/index.md +68 -0
- package/templates/apps/website/monorepo/manage.md +60 -0
- package/templates/apps/website/monorepo/publish.md +189 -0
- package/templates/apps/website/package.json +34 -0
- package/templates/apps/website/public/logo.jpg +0 -0
- package/templates/apps/website/thinking.md +88 -0
- package/templates/apps/website/tools/changeset.md +87 -0
- package/templates/apps/website/tools/husky.md +108 -0
- package/templates/apps/website/tools/lint-staged.md +79 -0
- package/templates/apps/website/tools/pnpm.md +100 -0
- package/templates/apps/website/tools/renovate.md +91 -0
- package/templates/apps/website/tools/turborepo.md +149 -0
- package/templates/apps/website/why/assets/npm-dt.svg +15 -0
- package/templates/apps/website/why/assets/npm-ts.svg +19 -0
- package/templates/apps/website/why/examples/0.npm-basic-package/index.js +9 -0
- package/templates/apps/website/why/examples/0.npm-basic-package/package.json +11 -0
- package/templates/apps/website/why/examples/1.npm-basic-package/index.cjs +11 -0
- package/templates/apps/website/why/examples/1.npm-basic-package/index.d.ts +1 -0
- package/templates/apps/website/why/examples/1.npm-basic-package/index.js +7 -0
- package/templates/apps/website/why/examples/1.npm-basic-package/package.json +19 -0
- package/templates/apps/website/why/examples/2.npm-basic-package/README.md +1 -0
- package/templates/apps/website/why/examples/2.npm-basic-package/package-lock.json +30 -0
- package/templates/apps/website/why/examples/2.npm-basic-package/package.json +35 -0
- package/templates/apps/website/why/examples/2.npm-basic-package/rename-ext.js +24 -0
- package/templates/apps/website/why/examples/2.npm-basic-package/src/index.ts +7 -0
- package/templates/apps/website/why/examples/2.npm-basic-package/tsconfig.cjs.json +8 -0
- package/templates/apps/website/why/examples/2.npm-basic-package/tsconfig.esm.json +7 -0
- package/templates/apps/website/why/examples/2.npm-basic-package/tsconfig.json +18 -0
- package/templates/apps/website/why/examples/3.npm-basic-package/README.md +1 -0
- package/templates/apps/website/why/examples/3.npm-basic-package/build.config.ts +24 -0
- package/templates/apps/website/why/examples/3.npm-basic-package/package-lock.json +3661 -0
- package/templates/apps/website/why/examples/3.npm-basic-package/package.json +32 -0
- package/templates/apps/website/why/examples/3.npm-basic-package/src/index.ts +7 -0
- package/templates/apps/website/why/examples/3.npm-basic-package/tsconfig.json +16 -0
- package/templates/apps/website/why/examples/3.npm-basic-package/tsup.config.ts +16 -0
- package/templates/apps/website/why/examples/usage-cjs/cjs.cjs +3 -0
- package/templates/apps/website/why/examples/usage-cjs/esm.mjs +3 -0
- package/templates/apps/website/why/examples/usage-cjs/index.js +11 -0
- package/templates/apps/website/why/examples/usage-cjs/package-lock.json +42 -0
- package/templates/apps/website/why/examples/usage-cjs/package.json +20 -0
- package/templates/apps/website/why/examples/usage-esm/cjs.cjs +3 -0
- package/templates/apps/website/why/examples/usage-esm/createRequire.js +7 -0
- package/templates/apps/website/why/examples/usage-esm/esm.mjs +3 -0
- package/templates/apps/website/why/examples/usage-esm/index.js +7 -0
- package/templates/apps/website/why/examples/usage-esm/package-lock.json +42 -0
- package/templates/apps/website/why/examples/usage-esm/package.json +21 -0
- package/templates/apps/website/why/how-to-reuse-js-code.md +250 -0
- package/templates/apps/website/why/index.md +1 -0
- package/templates/apps/website/why/js-cjs-mjs.md +99 -0
- package/templates/apps/website/why/js-keywords.md +132 -0
- package/templates/apps/website/why/modern/bundlers.md +79 -0
- package/templates/apps/website/why/modern/dts.md +93 -0
- package/templates/apps/website/why/modern/esm-vs-cjs.md +84 -0
- package/templates/apps/website/why/modern/index.md +55 -0
- package/templates/apps/website/why/modern/package-entry-points.md +128 -0
- package/templates/apps/website/why/modern/typescript.md +155 -0
- package/templates/apps/website/why/publish-basic-npm-package.md +146 -0
- package/templates/apps/website/why/what-is-npm-package.md +162 -0
- package/templates/packages/tsup-template/build.config.ts +24 -0
- package/templates/packages/tsup-template/package.json +42 -0
- package/templates/packages/tsup-template/src/index.ts +12 -0
- package/templates/packages/tsup-template/test/index.test.ts +7 -0
- package/templates/packages/tsup-template/tsconfig.json +15 -0
- package/templates/packages/tsup-template/tsup.config.ts +18 -0
- package/templates/packages/tsup-template/vitest.config.ts +15 -0
- package/templates/packages/unbuild-template/build.config.ts +24 -0
- package/templates/packages/unbuild-template/package.json +42 -0
- package/templates/packages/unbuild-template/src/index.ts +9 -0
- package/templates/packages/unbuild-template/src/utils.ts +3 -0
- package/templates/packages/unbuild-template/test/index.test.ts +7 -0
- package/templates/packages/unbuild-template/tsconfig.json +15 -0
- package/templates/packages/unbuild-template/vitest.config.ts +15 -0
- package/templates/packages/vue-lib-template/eslint.config.js +12 -0
- package/templates/packages/vue-lib-template/index.html +13 -0
- package/templates/packages/vue-lib-template/lib/HelloWorld.vue +21 -0
- package/templates/packages/vue-lib-template/lib/index.ts +3 -0
- package/templates/packages/vue-lib-template/package.json +61 -0
- package/templates/packages/vue-lib-template/src/App.vue +9 -0
- package/templates/packages/vue-lib-template/src/main.ts +8 -0
- package/templates/packages/vue-lib-template/src/pages/index.vue +7 -0
- package/templates/packages/vue-lib-template/src/router/index.ts +11 -0
- package/templates/packages/vue-lib-template/src/style.css +1 -0
- package/templates/packages/vue-lib-template/src/vite-env.d.ts +2 -0
- package/templates/packages/vue-lib-template/test/index.test.ts +13 -0
- package/templates/packages/vue-lib-template/tsconfig.app.json +30 -0
- package/templates/packages/vue-lib-template/tsconfig.json +14 -0
- package/templates/packages/vue-lib-template/tsconfig.node.json +25 -0
- package/templates/packages/vue-lib-template/tsconfig.test.json +40 -0
- package/templates/packages/vue-lib-template/vite.config.ts +47 -0
- package/templates/packages/vue-lib-template/vite.shared.config.ts +13 -0
- package/templates/packages/vue-lib-template/vitest.config.ts +13 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import path from 'node:path'
|
|
2
|
+
import { defineProject } from 'vitest/config'
|
|
3
|
+
|
|
4
|
+
export default defineProject({
|
|
5
|
+
test: {
|
|
6
|
+
alias: [
|
|
7
|
+
{
|
|
8
|
+
find: '@',
|
|
9
|
+
replacement: path.resolve(__dirname, './src'),
|
|
10
|
+
},
|
|
11
|
+
],
|
|
12
|
+
globals: true,
|
|
13
|
+
testTimeout: 60_000,
|
|
14
|
+
},
|
|
15
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>Vite + Vue + TS</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="app"></div>
|
|
11
|
+
<script type="module" src="/src/main.ts"></script>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
withDefaults(defineProps<{
|
|
3
|
+
msg?: string
|
|
4
|
+
}>(), {
|
|
5
|
+
msg: 'Hello World',
|
|
6
|
+
})
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<div class="p-2">
|
|
11
|
+
<div class="rounded-2xl p-2">
|
|
12
|
+
{{ msg }}
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<style scoped>
|
|
18
|
+
.a {
|
|
19
|
+
color: aliceblue;
|
|
20
|
+
}
|
|
21
|
+
</style>
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@icebreakers/vue-lib-template",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"description": "vue lib vite lib mode template",
|
|
6
|
+
"author": "ice breaker <1324318532@qq.com>",
|
|
7
|
+
"license": "ISC",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/sonofmagic/monorepo-template.git",
|
|
11
|
+
"directory": "packages/vue-lib-template"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/sonofmagic/monorepo-template/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [],
|
|
17
|
+
"sideEffects": false,
|
|
18
|
+
"exports": {
|
|
19
|
+
".": "./lib/index.ts"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"dist"
|
|
23
|
+
],
|
|
24
|
+
"scripts": {
|
|
25
|
+
"dev": "vite",
|
|
26
|
+
"build": "vue-tsc -b && vite build",
|
|
27
|
+
"preview": "vite preview",
|
|
28
|
+
"test": "vitest run",
|
|
29
|
+
"test:dev": "vitest",
|
|
30
|
+
"release": "pnpm publish",
|
|
31
|
+
"lint": "eslint .",
|
|
32
|
+
"lint:fix": "eslint . --fix"
|
|
33
|
+
},
|
|
34
|
+
"publishConfig": {
|
|
35
|
+
"exports": {
|
|
36
|
+
".": {
|
|
37
|
+
"types": "./dist/index.d.ts",
|
|
38
|
+
"import": "./dist/index.js",
|
|
39
|
+
"require": "./dist/index.umd.cjs"
|
|
40
|
+
},
|
|
41
|
+
"./style.css": "./dist/index.css"
|
|
42
|
+
},
|
|
43
|
+
"main": "./dist/index.umd.cjs",
|
|
44
|
+
"module": "./dist/index.js",
|
|
45
|
+
"types": "./dist/index.d.ts"
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@tailwindcss/vite": "^4.1.13",
|
|
49
|
+
"@vitejs/plugin-vue": "^6.0.1",
|
|
50
|
+
"@vue/test-utils": "^2.4.6",
|
|
51
|
+
"@vue/tsconfig": "^0.8.1",
|
|
52
|
+
"jsdom": "^27.0.0",
|
|
53
|
+
"tailwindcss": "^4.1.13",
|
|
54
|
+
"unplugin-vue-router": "^0.15.0",
|
|
55
|
+
"vite": "^7.1.6",
|
|
56
|
+
"vite-plugin-dts": "^4.5.4",
|
|
57
|
+
"vue": "^3.5.21",
|
|
58
|
+
"vue-router": "^4.5.1",
|
|
59
|
+
"vue-tsc": "^3.0.7"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createRouter, createWebHistory } from 'vue-router'
|
|
2
|
+
import { handleHotUpdate, routes } from 'vue-router/auto-routes'
|
|
3
|
+
|
|
4
|
+
export const router = createRouter({
|
|
5
|
+
history: createWebHistory(),
|
|
6
|
+
routes,
|
|
7
|
+
})
|
|
8
|
+
|
|
9
|
+
if (import.meta.hot) {
|
|
10
|
+
handleHotUpdate(router)
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import 'tailwindcss';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { mount } from '@vue/test-utils'
|
|
2
|
+
import HelloWorld from '../lib/HelloWorld.vue'
|
|
3
|
+
|
|
4
|
+
it('displays message', () => {
|
|
5
|
+
const wrapper = mount(HelloWorld, {
|
|
6
|
+
props: {
|
|
7
|
+
msg: 'Hello world',
|
|
8
|
+
},
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
// Assert the rendered text of the component
|
|
12
|
+
expect(wrapper.text()).toContain('Hello world')
|
|
13
|
+
})
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "@vue/tsconfig/tsconfig.dom.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
|
5
|
+
"paths": {
|
|
6
|
+
"@/*": [
|
|
7
|
+
"./src/*"
|
|
8
|
+
],
|
|
9
|
+
"~/*": [
|
|
10
|
+
"./lib/*"
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
/* Linting */
|
|
14
|
+
"strict": true,
|
|
15
|
+
"noFallthroughCasesInSwitch": true,
|
|
16
|
+
"noUnusedLocals": true,
|
|
17
|
+
"noUnusedParameters": true,
|
|
18
|
+
"erasableSyntaxOnly": true,
|
|
19
|
+
"noUncheckedSideEffectImports": true
|
|
20
|
+
},
|
|
21
|
+
"include": [
|
|
22
|
+
"lib/**/*.ts",
|
|
23
|
+
"lib/**/*.tsx",
|
|
24
|
+
"lib/**/*.vue",
|
|
25
|
+
"src/**/*.ts",
|
|
26
|
+
"src/**/*.tsx",
|
|
27
|
+
"src/**/*.vue",
|
|
28
|
+
"types"
|
|
29
|
+
]
|
|
30
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
|
4
|
+
"target": "ES2023",
|
|
5
|
+
"lib": ["ES2023"],
|
|
6
|
+
"moduleDetection": "force",
|
|
7
|
+
"module": "ESNext",
|
|
8
|
+
|
|
9
|
+
/* Bundler mode */
|
|
10
|
+
"moduleResolution": "bundler",
|
|
11
|
+
"allowImportingTsExtensions": true,
|
|
12
|
+
|
|
13
|
+
/* Linting */
|
|
14
|
+
"strict": true,
|
|
15
|
+
"noFallthroughCasesInSwitch": true,
|
|
16
|
+
"noUnusedLocals": true,
|
|
17
|
+
"noUnusedParameters": true,
|
|
18
|
+
"noEmit": true,
|
|
19
|
+
"verbatimModuleSyntax": true,
|
|
20
|
+
"erasableSyntaxOnly": true,
|
|
21
|
+
"skipLibCheck": true,
|
|
22
|
+
"noUncheckedSideEffectImports": true
|
|
23
|
+
},
|
|
24
|
+
"include": ["vite.config.ts"]
|
|
25
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "@vue/tsconfig/tsconfig.dom.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
|
5
|
+
"target": "ES2023",
|
|
6
|
+
"lib": [
|
|
7
|
+
"ES2023"
|
|
8
|
+
],
|
|
9
|
+
"moduleDetection": "force",
|
|
10
|
+
"baseUrl": ".",
|
|
11
|
+
"module": "ESNext",
|
|
12
|
+
/* Bundler mode */
|
|
13
|
+
"moduleResolution": "bundler",
|
|
14
|
+
"paths": {
|
|
15
|
+
"@/*": [
|
|
16
|
+
"./src"
|
|
17
|
+
],
|
|
18
|
+
"~/*": [
|
|
19
|
+
"./lib"
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"types": [
|
|
23
|
+
"vitest/globals"
|
|
24
|
+
],
|
|
25
|
+
"allowImportingTsExtensions": true,
|
|
26
|
+
/* Linting */
|
|
27
|
+
"strict": true,
|
|
28
|
+
"noFallthroughCasesInSwitch": true,
|
|
29
|
+
"noUnusedLocals": true,
|
|
30
|
+
"noUnusedParameters": true,
|
|
31
|
+
"noEmit": true,
|
|
32
|
+
"verbatimModuleSyntax": true,
|
|
33
|
+
"erasableSyntaxOnly": true,
|
|
34
|
+
"skipLibCheck": true,
|
|
35
|
+
"noUncheckedSideEffectImports": true
|
|
36
|
+
},
|
|
37
|
+
"include": [
|
|
38
|
+
"test/**/*.ts"
|
|
39
|
+
]
|
|
40
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { UserConfig } from 'vite'
|
|
2
|
+
import Tailwindcss from '@tailwindcss/vite'
|
|
3
|
+
import Vue from '@vitejs/plugin-vue'
|
|
4
|
+
import path from 'pathe'
|
|
5
|
+
import VueRouter from 'unplugin-vue-router/vite'
|
|
6
|
+
import { mergeConfig } from 'vite'
|
|
7
|
+
import DTS from 'vite-plugin-dts'
|
|
8
|
+
import { sharedConfig } from './vite.shared.config'
|
|
9
|
+
|
|
10
|
+
export default mergeConfig(sharedConfig, {
|
|
11
|
+
plugins: [
|
|
12
|
+
VueRouter(
|
|
13
|
+
{
|
|
14
|
+
dts: path.relative(import.meta.dirname, './types/typed-router.d.ts'),
|
|
15
|
+
},
|
|
16
|
+
),
|
|
17
|
+
Vue(),
|
|
18
|
+
DTS(
|
|
19
|
+
{
|
|
20
|
+
tsconfigPath: './tsconfig.app.json',
|
|
21
|
+
entryRoot: './lib',
|
|
22
|
+
},
|
|
23
|
+
),
|
|
24
|
+
Tailwindcss(),
|
|
25
|
+
],
|
|
26
|
+
// https://vite.dev/guide/build.html#library-mode
|
|
27
|
+
build: {
|
|
28
|
+
lib: {
|
|
29
|
+
entry: path.resolve(import.meta.dirname, 'lib/index'),
|
|
30
|
+
name: 'icebreaker',
|
|
31
|
+
// the proper extensions will be added
|
|
32
|
+
fileName: 'index',
|
|
33
|
+
},
|
|
34
|
+
rollupOptions: {
|
|
35
|
+
// make sure to externalize deps that shouldn't be bundled
|
|
36
|
+
// into your library
|
|
37
|
+
external: ['vue'],
|
|
38
|
+
output: {
|
|
39
|
+
// Provide global variables to use in the UMD build
|
|
40
|
+
// for externalized deps
|
|
41
|
+
globals: {
|
|
42
|
+
vue: 'Vue',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
} satisfies UserConfig)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import path from 'pathe'
|
|
2
|
+
|
|
3
|
+
// https://vite.dev/guide/build.html#library-mode
|
|
4
|
+
import { defineConfig } from 'vite'
|
|
5
|
+
|
|
6
|
+
export const sharedConfig = defineConfig({
|
|
7
|
+
resolve: {
|
|
8
|
+
alias: {
|
|
9
|
+
'@': path.resolve(import.meta.dirname, 'src'),
|
|
10
|
+
'~': path.resolve(import.meta.dirname, 'lib'),
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
})
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { UserConfig } from 'vite'
|
|
2
|
+
import Vue from '@vitejs/plugin-vue'
|
|
3
|
+
import { mergeConfig } from 'vitest/config'
|
|
4
|
+
import { sharedConfig } from './vite.shared.config'
|
|
5
|
+
|
|
6
|
+
export default mergeConfig(sharedConfig, {
|
|
7
|
+
test: {
|
|
8
|
+
globals: true,
|
|
9
|
+
testTimeout: 60_000,
|
|
10
|
+
environment: 'jsdom',
|
|
11
|
+
},
|
|
12
|
+
plugins: [Vue()],
|
|
13
|
+
} satisfies UserConfig)
|