Skip to content

Commit

Permalink
移除不再需要的开发时 alias
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhang-Wei-666 committed Aug 16, 2023
1 parent 9f638d1 commit 5284767
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 17 deletions.
13 changes: 0 additions & 13 deletions meta/alias.ts

This file was deleted.

2 changes: 0 additions & 2 deletions packages/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -78,7 +77,6 @@ export default defineConfig({
vite: {
resolve: {
alias: {
...alias,
'@': resolve(__dirname, '../'),
'@@': resolve(__dirname, '../../'),
},
Expand Down
9 changes: 7 additions & 2 deletions vitest.config.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down

0 comments on commit 5284767

Please sign in to comment.