diff --git a/.fes.js b/.fes.js index 4f0ca49..130cbf7 100644 --- a/.fes.js +++ b/.fes.js @@ -2,10 +2,9 @@ export default { publicPath: './', - // TODO: `alias` doesn't support TS for now - // alias: { - // '~': 'src', - // }, + alias: { + '~': '/src', + }, access: { roles: { admin: ['*'], diff --git a/.fes.prod.js b/.fes.prod.js index 2ac4624..eb159aa 100644 --- a/.fes.prod.js +++ b/.fes.prod.js @@ -1,5 +1,5 @@ // .fes.js 只负责管理编译时配置,只能使用plain Object export default { - publicPath: '', + publicPath: './', } diff --git a/src/app.ts b/src/app.ts index 0057b75..deff1d3 100644 --- a/src/app.ts +++ b/src/app.ts @@ -1,6 +1,6 @@ import { access } from '@fesjs/fes' -import PageLoading from '@/components/PageLoading.vue' -import UserCenter from '@/components/UserCenter.vue' +import PageLoading from '~/components/PageLoading.vue' +import UserCenter from '~/components/UserCenter.vue' export const beforeRender = { loading: PageLoading, diff --git a/src/components/UserCenter.vue b/src/components/UserCenter.vue index 9a4639b..c6c5086 100644 --- a/src/components/UserCenter.vue +++ b/src/components/UserCenter.vue @@ -4,7 +4,7 @@ diff --git a/tsconfig.json b/tsconfig.json index 2817a6c..88eed9a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,9 +4,7 @@ "outDir": "build/dist", "baseUrl": ".", "paths": { - // TODO: `.fes.js` > `alias` doesn't support TS for now - // "~/*": ["src/*"], - "@/*": ["src/*"], + "~/*": ["src/*"], "@@/*": ["src/.fes/*"] } },