forked from iod/cpnode-front
feat: add alias: ~
-> src
This commit is contained in:
parent
a7c776a85e
commit
6382f68efd
7
.fes.js
7
.fes.js
@ -2,10 +2,9 @@
|
||||
|
||||
export default {
|
||||
publicPath: './',
|
||||
// TODO: `alias` doesn't support TS for now
|
||||
// alias: {
|
||||
// '~': 'src',
|
||||
// },
|
||||
alias: {
|
||||
'~': '/src',
|
||||
},
|
||||
access: {
|
||||
roles: {
|
||||
admin: ['*'],
|
||||
|
@ -1,5 +1,5 @@
|
||||
// .fes.js 只负责管理编译时配置,只能使用plain Object
|
||||
|
||||
export default {
|
||||
publicPath: '',
|
||||
publicPath: './',
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useModel } from '@fesjs/fes'
|
||||
import type { State } from '@/app'
|
||||
import type { State } from '~/app'
|
||||
|
||||
const initialState = useModel('@@initialState') as State
|
||||
</script>
|
||||
|
@ -4,9 +4,7 @@
|
||||
"outDir": "build/dist",
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
// TODO: `.fes.js` > `alias` doesn't support TS for now
|
||||
// "~/*": ["src/*"],
|
||||
"@/*": ["src/*"],
|
||||
"~/*": ["src/*"],
|
||||
"@@/*": ["src/.fes/*"]
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user