1
0
mirror of synced 2026-04-04 07:08:34 +08:00

feat(admin): 更新runtime

This commit is contained in:
roymondchen
2022-08-08 17:10:43 +08:00
committed by jia000
parent 1d8149b5eb
commit eba6cbccde
57 changed files with 42664 additions and 162 deletions

View File

@@ -35,7 +35,7 @@ export enum PageStatus {
export const StaticPath = {
ASSETS: path.resolve(__dirname, '../../assets'),
TEMPLATE: path.resolve(__dirname, '../template'),
RUNTIME: path.resolve(__dirname, '../../runtime'),
STATIC: path.resolve(__dirname, '../../static'),
PUBLISH: path.resolve(__dirname, '../../assets/publish'),
};

View File

@@ -29,8 +29,8 @@ router.get('/', async (ctx) => {
await send(ctx, `${StaticPath.ASSETS}/index.html`, options);
});
router.get('/runtime/*', async (ctx) => {
const file = `${StaticPath.RUNTIME}/${ctx.params[0]}`;
router.get('/static/*', async (ctx) => {
const file = `${StaticPath.STATIC}/${ctx.params[0]}`;
if (pathExistsSync(file)) {
await send(ctx, file, options);
}

View File

@@ -243,7 +243,7 @@ const publishHtml = (pageConfig: DivideConfigTrans) => {
try {
// 复制html模板
const distHtml = `${StaticPath.PUBLISH}/${pageName}.html`;
const tmpHtml = `${StaticPath.RUNTIME}/page.html`;
const tmpHtml = `${StaticPath.STATIC}/vue3/runtime/page/index.html`;
copySync(tmpHtml, distHtml);
// 注入活动配置文件
const configScript = `<script type='module' src='./uiconfig_${pageName}.js'></script>\n\t${UiRuntimeJS}`;