From ac3a53cfcf8b623eea06dee1566f5e397301c566 Mon Sep 17 00:00:00 2001 From: fxy060608 Date: Tue, 15 Feb 2022 11:55:49 +0800 Subject: [PATCH] wip(app): nvue --- packages/uni-app-vite/src/nvue/index.ts | 2 ++ .../uni-app-vite/src/nvue/plugin/index.ts | 12 ++++--- .../uni-app-vite/src/nvue/plugins/esbuild.ts | 29 ++--------------- .../uni-app-vite/src/nvue/plugins/mainJs.ts | 32 +++++++++++-------- .../src/nvue/plugins/pagesJson.ts | 10 +++--- packages/uni-app-vite/src/plugin/build.ts | 2 +- .../uni-app-vite/src/plugins/manifestJson.ts | 3 +- packages/uni-app-vite/src/plugins/template.ts | 30 ++++++++++++----- packages/uni-app-vite/src/utils.ts | 7 ++-- .../uni-app-vite/src/vue/plugins/pagesJson.ts | 3 +- .../uni-app-vue/dist/nvue.runtime.esm.dev.js | 3 +- .../uni-app-vue/dist/nvue.runtime.esm.prod.js | 3 +- packages/uni-app-vue/lib/nvue.runtime.esm.js | 5 +-- packages/uni-cli-shared/src/constants.ts | 2 ++ 14 files changed, 72 insertions(+), 71 deletions(-) diff --git a/packages/uni-app-vite/src/nvue/index.ts b/packages/uni-app-vite/src/nvue/index.ts index d96e57159..e6f29007a 100644 --- a/packages/uni-app-vite/src/nvue/index.ts +++ b/packages/uni-app-vite/src/nvue/index.ts @@ -8,6 +8,7 @@ import { import { uniEasycomPlugin } from '../plugins/easycom' import { uniManifestJsonPlugin } from '../plugins/manifestJson' import { uniStatsPlugin } from '../plugins/stats' +import { uniTemplatePlugin } from '../plugins/template' import { uniAppNVuePlugin } from './plugin' import { uniAppCssPlugin } from './plugins/appCss' import { uniEsbuildPlugin } from './plugins/esbuild' @@ -30,5 +31,6 @@ export function initNVuePlugins() { uniStatsPlugin(), uniAppNVuePlugin({ appService }), uniEsbuildPlugin({ renderer, appService }), + ...(appService ? [uniTemplatePlugin({ renderer })] : []), ] } diff --git a/packages/uni-app-vite/src/nvue/plugin/index.ts b/packages/uni-app-vite/src/nvue/plugin/index.ts index 8c62444fa..788b23604 100644 --- a/packages/uni-app-vite/src/nvue/plugin/index.ts +++ b/packages/uni-app-vite/src/nvue/plugin/index.ts @@ -3,6 +3,7 @@ import type { Plugin } from 'vite' import path from 'path' import colors from 'picocolors' import { + APP_SERVICE_FILENAME, commonjsProxyRE, createTransformTag, cssLangRE, @@ -66,18 +67,19 @@ export function uniAppNVuePlugin({ }, build: { lib: { + name: 'AppService', // 必须使用 lib 模式,否则会生成 preload 等代码 - fileName: 'app', + fileName: appService ? 'app-service' : 'app', entry: mainPath, - formats: ['es'], + formats: [appService ? 'iife' : 'es'], }, - outDir: nvueOutDir(appService), + outDir: appService ? process.env.UNI_OUTPUT_DIR : nvueOutDir(), rollupOptions: { external: external(appService), output: { entryFileNames(chunk) { - if (chunk.name === 'main') { - return 'app.js' + if (chunk.name === 'main' && chunk.isEntry) { + return appService ? APP_SERVICE_FILENAME : 'app.js' } return chunk.name + '.js' }, diff --git a/packages/uni-app-vite/src/nvue/plugins/esbuild.ts b/packages/uni-app-vite/src/nvue/plugins/esbuild.ts index 317148ba8..743f5d935 100644 --- a/packages/uni-app-vite/src/nvue/plugins/esbuild.ts +++ b/packages/uni-app-vite/src/nvue/plugins/esbuild.ts @@ -5,10 +5,7 @@ import path from 'path' import fs from 'fs-extra' import debug from 'debug' -import { - APP_SERVICE_FILENAME, - transformWithEsbuild, -} from '@dcloudio/uni-cli-shared' +import { transformWithEsbuild } from '@dcloudio/uni-cli-shared' import { nvueOutDir } from '../../utils' import { esbuildGlobals } from '../utils' @@ -52,15 +49,6 @@ export function uniEsbuildPlugin({ entryPoints.push(name) } }) - if (appService) { - debugEsbuild('start', APP_SERVICE_FILENAME) - await buildNVueAppService(buildOptions).then((code) => { - return fs.outputFile( - path.resolve(outputDir, APP_SERVICE_FILENAME), - code - ) - }) - } debugEsbuild('start', entryPoints.length, entryPoints) for (const filename of entryPoints) { await buildNVuePage(renderer, filename, buildOptions).then((code) => { @@ -72,19 +60,6 @@ export function uniEsbuildPlugin({ } } -function buildNVueAppService(options: BuildOptions) { - return transformWithEsbuild( - `import './app.js'`, - path.join(nvueOutDir(true), 'main.js'), - options - ).then((res) => { - if (res.outputFiles) { - return res.outputFiles[0].text - } - return '' - }) -} - function buildNVuePage( renderer: 'native' | undefined, filename: string, @@ -106,7 +81,7 @@ App.mpType = 'page' const app = Vue.createApp(App,{$store:getApp().$store,__pageId,__pagePath,__pageQuery}) app.provide('__globalStyles', Vue.useCssStyles([...AppStyles, ...(App.styles||[])])) app.mount('#root')`, - path.join(nvueOutDir(false), 'main.js'), + path.join(nvueOutDir(), 'main.js'), options ).then((res) => { if (res.outputFiles) { diff --git a/packages/uni-app-vite/src/nvue/plugins/mainJs.ts b/packages/uni-app-vite/src/nvue/plugins/mainJs.ts index d619a1777..11e2b3ce0 100644 --- a/packages/uni-app-vite/src/nvue/plugins/mainJs.ts +++ b/packages/uni-app-vite/src/nvue/plugins/mainJs.ts @@ -1,4 +1,8 @@ -import { defineUniMainJsPlugin, PAGES_JSON_JS } from '@dcloudio/uni-cli-shared' +import { + defineUniMainJsPlugin, + MANIFEST_JSON_JS, + PAGES_JSON_JS, +} from '@dcloudio/uni-cli-shared' import { APP_CSS_JS } from './appCss' export function uniMainJsPlugin({ @@ -14,23 +18,25 @@ export function uniMainJsPlugin({ enforce: 'pre', transform(code, id) { if (opts.filter(id)) { - if (renderer) { - if (appService) { - code = code.includes('createSSRApp') - ? createApp(code) - : createLegacyApp(code) - return { - code, - map: { mappings: '' }, - } + if (renderer !== 'native') { + return { + code: `import './${PAGES_JSON_JS}';import('${APP_CSS_JS}').then(()=>{})`, + map: { mappings: '' }, } + } + if (appService) { + code = code.includes('createSSRApp') + ? createApp(code) + : createLegacyApp(code) return { - code: `import './${PAGES_JSON_JS}';`, + code: + `import './${MANIFEST_JSON_JS}';\nimport './${PAGES_JSON_JS}';\n` + + code, map: { mappings: '' }, } } return { - code: `import './${PAGES_JSON_JS}';import('${APP_CSS_JS}').then(()=>{})`, + code: `import './${PAGES_JSON_JS}';`, map: { mappings: '' }, } } @@ -43,7 +49,7 @@ function createApp(code: string) { return `${code.replace( 'createSSRApp', 'createVueApp as createSSRApp' - )};const {app:__app__,Vuex:__Vuex__,Pinia:__Pinia__}=createApp();uni.Vuex=__Vuex__;uni.Pinia=__Pinia__;__app__._component.mpType='app';__app__._component.render=()=>{};__app__.mount("#app");` + )};const {app:__app__,Vuex:__Vuex__,Pinia:__Pinia__}=createApp();uni.Vuex=__Vuex__;uni.Pinia=__Pinia__;__app__._component.mpType='app';__app__._component.render=()=>{};__app__.mount({appendChild(){}});` } function createLegacyApp(code: string) { diff --git a/packages/uni-app-vite/src/nvue/plugins/pagesJson.ts b/packages/uni-app-vite/src/nvue/plugins/pagesJson.ts index 303bbe5db..7632d4ac0 100644 --- a/packages/uni-app-vite/src/nvue/plugins/pagesJson.ts +++ b/packages/uni-app-vite/src/nvue/plugins/pagesJson.ts @@ -8,7 +8,7 @@ import { parseManifestJsonOnce, getLocaleFiles, normalizeAppNVuePagesJson, - MANIFEST_JSON_JS, + APP_CONFIG_SERVICE, } from '@dcloudio/uni-cli-shared' export function uniPagesJsonPlugin({ @@ -40,9 +40,9 @@ export function uniPagesJsonPlugin({ ) } }) - if (renderer === 'native' && !appService) { + if (renderer === 'native' && appService) { this.emitFile({ - fileName: `app-config-service.js`, + fileName: APP_CONFIG_SERVICE, type: 'asset', source: normalizeAppConfigService( pagesJson, @@ -50,9 +50,7 @@ export function uniPagesJsonPlugin({ ), }) return { - code: - `import './${MANIFEST_JSON_JS}'\n` + - normalizeAppNVuePagesJson(pagesJson), + code: '', map: { mappings: '' }, } } diff --git a/packages/uni-app-vite/src/plugin/build.ts b/packages/uni-app-vite/src/plugin/build.ts index 72449bdbe..a7b502624 100644 --- a/packages/uni-app-vite/src/plugin/build.ts +++ b/packages/uni-app-vite/src/plugin/build.ts @@ -22,7 +22,7 @@ export function buildOptions( const outputDir = process.env.UNI_OUTPUT_DIR // 开始编译时,清空输出目录 function emptyNVueDir() { - const nvueOutputDir = nvueOutDir(false) + const nvueOutputDir = nvueOutDir() if (fs.existsSync(nvueOutputDir)) { emptyDir(nvueOutputDir) } diff --git a/packages/uni-app-vite/src/plugins/manifestJson.ts b/packages/uni-app-vite/src/plugins/manifestJson.ts index f95fe7777..31189c043 100644 --- a/packages/uni-app-vite/src/plugins/manifestJson.ts +++ b/packages/uni-app-vite/src/plugins/manifestJson.ts @@ -2,6 +2,7 @@ import path from 'path' import { Plugin } from 'vite' import { + APP_CONFIG, defineUniManifestJsonPlugin, getLocaleFiles, normalizeAppManifestJson, @@ -30,7 +31,7 @@ export function uniManifestJsonPlugin(): Plugin { // 生成一个空的 app-config.js,兼容基座已有规范 this.emitFile({ - fileName: `app-config.js`, + fileName: APP_CONFIG, type: 'asset', source: '(function(){})();', }) diff --git a/packages/uni-app-vite/src/plugins/template.ts b/packages/uni-app-vite/src/plugins/template.ts index b0e622b93..7ec09982f 100644 --- a/packages/uni-app-vite/src/plugins/template.ts +++ b/packages/uni-app-vite/src/plugins/template.ts @@ -3,23 +3,37 @@ import fs from 'fs-extra' import { Plugin } from 'vite' import { templateDir } from '../utils' -export function uniTemplatePlugin(): Plugin { +export function uniTemplatePlugin({ + renderer, +}: { + renderer?: 'native' +} = {}): Plugin { let outputDir: string return { name: 'uni:app-template', enforce: 'post', configResolved() { outputDir = process.env.UNI_OUTPUT_DIR - fs.copySync( - require.resolve('@dcloudio/uni-app-plus/dist/uni-app-view.umd.js'), - path.resolve(outputDir, 'uni-app-view.umd.js'), - { - overwrite: true, - } - ) + if (renderer !== 'native') { + fs.copySync( + require.resolve('@dcloudio/uni-app-plus/dist/uni-app-view.umd.js'), + path.resolve(outputDir, 'uni-app-view.umd.js'), + { + overwrite: true, + } + ) + } fs.copySync(templateDir, outputDir, { overwrite: true, filter(src) { + if (renderer === 'native') { + if ( + src.includes('__uniappquill') || + src.includes('__uniappautomator') + ) { + return false + } + } return !src.includes('__uniappview.html') }, }) diff --git a/packages/uni-app-vite/src/utils.ts b/packages/uni-app-vite/src/utils.ts index 837e462b0..bb1580478 100644 --- a/packages/uni-app-vite/src/utils.ts +++ b/packages/uni-app-vite/src/utils.ts @@ -1,8 +1,5 @@ import path from 'path' export const templateDir = path.resolve(__dirname, '../lib/template/') -export function nvueOutDir(appService: boolean) { - return path.join( - process.env.UNI_OUTPUT_DIR, - '../.nvue' + (appService ? '/.app-service' : '') - ) +export function nvueOutDir() { + return path.join(process.env.UNI_OUTPUT_DIR, '../.nvue') } diff --git a/packages/uni-app-vite/src/vue/plugins/pagesJson.ts b/packages/uni-app-vite/src/vue/plugins/pagesJson.ts index 8596d0606..b01c62ba0 100644 --- a/packages/uni-app-vite/src/vue/plugins/pagesJson.ts +++ b/packages/uni-app-vite/src/vue/plugins/pagesJson.ts @@ -9,6 +9,7 @@ import { parseManifestJsonOnce, getLocaleFiles, MANIFEST_JSON_JS, + APP_CONFIG_SERVICE, } from '@dcloudio/uni-cli-shared' export function uniPagesJsonPlugin(): Plugin { @@ -35,7 +36,7 @@ export function uniPagesJsonPlugin(): Plugin { } }) this.emitFile({ - fileName: `app-config-service.js`, + fileName: APP_CONFIG_SERVICE, type: 'asset', source: normalizeAppConfigService( pagesJson, diff --git a/packages/uni-app-vue/dist/nvue.runtime.esm.dev.js b/packages/uni-app-vue/dist/nvue.runtime.esm.dev.js index 77b6c1a7c..ee56164eb 100644 --- a/packages/uni-app-vue/dist/nvue.runtime.esm.dev.js +++ b/packages/uni-app-vue/dist/nvue.runtime.esm.dev.js @@ -9722,4 +9722,5 @@ var createApp = function () { return app; }; -export { BaseTransition, Comment, Fragment, KeepAlive, Static, Suspense, Teleport, Text, callWithAsyncErrorHandling, callWithErrorHandling, cloneVNode, compatUtils, computed, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSlots, createStaticVNode, createTextVNode, createVNode, defineAsyncComponent, defineComponent, defineEmits, defineExpose, defineProps, devtools, getCurrentInstance, getTransitionRawChildren, guardReactiveProps, h, handleError, initCustomFormatter, inject, injectHook, isInSSRComponentSetup, isMemoSame, isRuntimeOnly, isVNode, mergeDefaults, mergeProps, nextTick, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, pushScopeId, queuePostFlushCb, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, ssrContextKey, toHandlers, transformVNodeArgs, useAttrs, useCssModule, useCssStyles, useCssVars, useSSRContext, useSlots, useTransitionState, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withMemo, withScopeId }; +var createVueApp = createApp; +export { BaseTransition, Comment, Fragment, KeepAlive, Static, Suspense, Teleport, Text, callWithAsyncErrorHandling, callWithErrorHandling, cloneVNode, compatUtils, computed, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSlots, createStaticVNode, createTextVNode, createVNode, createVueApp, defineAsyncComponent, defineComponent, defineEmits, defineExpose, defineProps, devtools, getCurrentInstance, getTransitionRawChildren, guardReactiveProps, h, handleError, initCustomFormatter, inject, injectHook, isInSSRComponentSetup, isMemoSame, isRuntimeOnly, isVNode, mergeDefaults, mergeProps, nextTick, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, pushScopeId, queuePostFlushCb, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, ssrContextKey, toHandlers, transformVNodeArgs, useAttrs, useCssModule, useCssStyles, useCssVars, useSSRContext, useSlots, useTransitionState, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withMemo, withScopeId }; diff --git a/packages/uni-app-vue/dist/nvue.runtime.esm.prod.js b/packages/uni-app-vue/dist/nvue.runtime.esm.prod.js index 5d800178f..dd09354a3 100644 --- a/packages/uni-app-vue/dist/nvue.runtime.esm.prod.js +++ b/packages/uni-app-vue/dist/nvue.runtime.esm.prod.js @@ -7985,4 +7985,5 @@ var createApp = function () { return app; }; -export { BaseTransition, Comment, Fragment, KeepAlive, Static, Suspense, Teleport, Text, callWithAsyncErrorHandling, callWithErrorHandling, cloneVNode, compatUtils, computed, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSlots, createStaticVNode, createTextVNode, createVNode, defineAsyncComponent, defineComponent, defineEmits, defineExpose, defineProps, devtools, getCurrentInstance, getTransitionRawChildren, guardReactiveProps, h, handleError, initCustomFormatter, inject, injectHook, isInSSRComponentSetup, isMemoSame, isRuntimeOnly, isVNode, mergeDefaults, mergeProps, nextTick, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, pushScopeId, queuePostFlushCb, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, ssrContextKey, toHandlers, transformVNodeArgs, useAttrs, useCssModule, useCssStyles, useCssVars, useSSRContext, useSlots, useTransitionState, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withMemo, withScopeId }; +var createVueApp = createApp; +export { BaseTransition, Comment, Fragment, KeepAlive, Static, Suspense, Teleport, Text, callWithAsyncErrorHandling, callWithErrorHandling, cloneVNode, compatUtils, computed, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSlots, createStaticVNode, createTextVNode, createVNode, createVueApp, defineAsyncComponent, defineComponent, defineEmits, defineExpose, defineProps, devtools, getCurrentInstance, getTransitionRawChildren, guardReactiveProps, h, handleError, initCustomFormatter, inject, injectHook, isInSSRComponentSetup, isMemoSame, isRuntimeOnly, isVNode, mergeDefaults, mergeProps, nextTick, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, pushScopeId, queuePostFlushCb, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, ssrContextKey, toHandlers, transformVNodeArgs, useAttrs, useCssModule, useCssStyles, useCssVars, useSSRContext, useSlots, useTransitionState, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withMemo, withScopeId }; diff --git a/packages/uni-app-vue/lib/nvue.runtime.esm.js b/packages/uni-app-vue/lib/nvue.runtime.esm.js index 19f8ea41d..c6400151e 100644 --- a/packages/uni-app-vue/lib/nvue.runtime.esm.js +++ b/packages/uni-app-vue/lib/nvue.runtime.esm.js @@ -8120,6 +8120,7 @@ const createApp = ((...args) => { return mount(container); }; return app; -}); +}); +const createVueApp = createApp; -export { BaseTransition, Comment, Fragment, KeepAlive, Static, Suspense, Teleport, Text, callWithAsyncErrorHandling, callWithErrorHandling, cloneVNode, compatUtils, computed, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSlots, createStaticVNode, createTextVNode, createVNode, defineAsyncComponent, defineComponent, defineEmits, defineExpose, defineProps, devtools, getCurrentInstance, getTransitionRawChildren, guardReactiveProps, h, handleError, initCustomFormatter, inject, injectHook, isInSSRComponentSetup, isMemoSame, isRuntimeOnly, isVNode, mergeDefaults, mergeProps, nextTick, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, pushScopeId, queuePostFlushCb, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, ssrContextKey, toHandlers, transformVNodeArgs, useAttrs, useCssModule, useCssStyles, useCssVars, useSSRContext, useSlots, useTransitionState, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withMemo, withScopeId }; +export { BaseTransition, Comment, Fragment, KeepAlive, Static, Suspense, Teleport, Text, callWithAsyncErrorHandling, callWithErrorHandling, cloneVNode, compatUtils, computed, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSlots, createStaticVNode, createTextVNode, createVNode, createVueApp, defineAsyncComponent, defineComponent, defineEmits, defineExpose, defineProps, devtools, getCurrentInstance, getTransitionRawChildren, guardReactiveProps, h, handleError, initCustomFormatter, inject, injectHook, isInSSRComponentSetup, isMemoSame, isRuntimeOnly, isVNode, mergeDefaults, mergeProps, nextTick, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, pushScopeId, queuePostFlushCb, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, ssrContextKey, toHandlers, transformVNodeArgs, useAttrs, useCssModule, useCssStyles, useCssVars, useSSRContext, useSlots, useTransitionState, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withMemo, withScopeId }; diff --git a/packages/uni-cli-shared/src/constants.ts b/packages/uni-cli-shared/src/constants.ts index 60c9a514c..29c5113b0 100644 --- a/packages/uni-cli-shared/src/constants.ts +++ b/packages/uni-cli-shared/src/constants.ts @@ -25,6 +25,8 @@ export const JSON_JS_MAP = { export const ASSETS_INLINE_LIMIT = 40 * 1024 export const APP_SERVICE_FILENAME = 'app-service.js' +export const APP_CONFIG = 'app-config.js' +export const APP_CONFIG_SERVICE = 'app-config-service.js' export const BINDING_COMPONENTS = '__BINDING_COMPONENTS__' // APP 平台解析页面后缀的优先级 -- GitLab