diff --git a/meta/alias.ts b/meta/alias.ts deleted file mode 100644 index 05cf7530..00000000 --- a/meta/alias.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { resolve } from 'node:path'; - -export const alias = { - 'mixte': resolve(__dirname, '../packages/mixte/index'), - '@mixte/use/register': resolve(__dirname, '../packages/use/register'), - '@mixte/use': resolve(__dirname, '../packages/use/index'), -}; - -export const testAlias: Record = { - 'mixte': resolve(__dirname, '../packages/mixte/dist/index'), - '@mixte/use/register': resolve(__dirname, '../packages/use/dist/register'), - '@mixte/use': resolve(__dirname, '../packages/use/dist/index'), -}; diff --git a/packages/.vitepress/config.mts b/packages/.vitepress/config.mts index 68bbda92..72b86f2f 100644 --- a/packages/.vitepress/config.mts +++ b/packages/.vitepress/config.mts @@ -8,7 +8,6 @@ import AutoImport from 'unplugin-auto-import/vite'; import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'; import { MixteUseAutoImport } from '../use/register'; import { mixte, use } from '../../meta/docs.json'; -import { alias } from '../../meta/alias'; import { version } from '../../package.json'; import { MarkdownTransform } from './plugins/markdownTransform'; @@ -78,7 +77,6 @@ export default defineConfig({ vite: { resolve: { alias: { - ...alias, '@': resolve(__dirname, '../'), '@@': resolve(__dirname, '../../'), }, diff --git a/vitest.config.ts b/vitest.config.ts index 62fc3e56..a698d44d 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -1,12 +1,17 @@ +import { resolve } from 'node:path'; import { defineConfig } from 'vitest/config'; -import { alias, testAlias } from './meta/alias'; export default defineConfig(({ mode }) => { const isTestBuild = mode === 'test-build'; + const testBuildAlias = { + 'mixte': resolve(__dirname, './packages/mixte/dist/index'), + '@mixte/use/register': resolve(__dirname, './packages/use/dist/register'), + '@mixte/use': resolve(__dirname, './packages/use/dist/index'), + }; return { resolve: { - alias: isTestBuild ? testAlias : alias, + alias: isTestBuild ? testBuildAlias : {}, }, test: { globals: true,