Skip to content

Commit

Permalink
chore: add alias configuration (#1587)
Browse files Browse the repository at this point in the history
  • Loading branch information
anlyyao authored Sep 13, 2024
1 parent 849de08 commit c5d5d2d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions site/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export default ({ mode }) => {
'@': resolvePath('../src'),
'@docs': resolvePath('./docs'),
'@common': resolvePath('../src/_common'),
'tdesign-mobile-vue/es': resolvePath('../src'),
'tdesign-mobile-vue': resolvePath('../src'),
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/config-provider/demos/other-en.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<script lang="ts" setup>
import { ref } from 'vue';
import merge from 'lodash/merge';
import enConfig from '../../locale/en_US';
import enConfig from 'tdesign-mobile-vue/es/locale/en_US';
// 全局特性配置,可以引入英文默认配置 enConfig,还可以在默认配置的基础上进行自定义配置
const globalConfig = merge(enConfig, {
Expand Down
2 changes: 1 addition & 1 deletion src/config-provider/demos/table-en.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<script setup lang="ts">
import merge from 'lodash/merge';
import enConfig from '../../locale/en_US';
import enConfig from 'tdesign-mobile-vue/es/locale/en_US';
const columns = [
{
Expand Down
2 changes: 1 addition & 1 deletion src/config-provider/demos/upload-en.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</t-config-provider>
</template>
<script setup lang="ts">
import enConfig from '../../locale/en_US';
import enConfig from 'tdesign-mobile-vue/es/locale/en_US';
const files = [
{
Expand Down
5 changes: 4 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@
"baseUrl": "./",
"paths": {
"@/*": ["src/*"],
"tdesign-mobile-vue": ["src"]
"tdesign-mobile-vue": ["src"],
"tdesign-mobile-vue/es/locale/*": [
"src/locale/*"
],
},
"types": ["vitest/globals"],
"lib": ["esnext", "dom", "dom.iterable", "scripthost"]
Expand Down

0 comments on commit c5d5d2d

Please sign in to comment.