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 {
|
export default {
|
||||||
publicPath: './',
|
publicPath: './',
|
||||||
// TODO: `alias` doesn't support TS for now
|
alias: {
|
||||||
// alias: {
|
'~': '/src',
|
||||||
// '~': 'src',
|
},
|
||||||
// },
|
|
||||||
access: {
|
access: {
|
||||||
roles: {
|
roles: {
|
||||||
admin: ['*'],
|
admin: ['*'],
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// .fes.js 只负责管理编译时配置,只能使用plain Object
|
// .fes.js 只负责管理编译时配置,只能使用plain Object
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
publicPath: '',
|
publicPath: './',
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { access } from '@fesjs/fes'
|
import { access } from '@fesjs/fes'
|
||||||
import PageLoading from '@/components/PageLoading.vue'
|
import PageLoading from '~/components/PageLoading.vue'
|
||||||
import UserCenter from '@/components/UserCenter.vue'
|
import UserCenter from '~/components/UserCenter.vue'
|
||||||
|
|
||||||
export const beforeRender = {
|
export const beforeRender = {
|
||||||
loading: PageLoading,
|
loading: PageLoading,
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useModel } from '@fesjs/fes'
|
import { useModel } from '@fesjs/fes'
|
||||||
import type { State } from '@/app'
|
import type { State } from '~/app'
|
||||||
|
|
||||||
const initialState = useModel('@@initialState') as State
|
const initialState = useModel('@@initialState') as State
|
||||||
</script>
|
</script>
|
||||||
|
@ -4,9 +4,7 @@
|
|||||||
"outDir": "build/dist",
|
"outDir": "build/dist",
|
||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
"paths": {
|
"paths": {
|
||||||
// TODO: `.fes.js` > `alias` doesn't support TS for now
|
"~/*": ["src/*"],
|
||||||
// "~/*": ["src/*"],
|
|
||||||
"@/*": ["src/*"],
|
|
||||||
"@@/*": ["src/.fes/*"]
|
"@@/*": ["src/.fes/*"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user