提交 3d2d1efc 编写于 作者: fxy060608's avatar fxy060608

wip(app): nvue

上级 761bb97d
import { defineUniMainJsPlugin } from '@dcloudio/uni-cli-shared'
import { defineUniMainJsPlugin, PAGES_JSON_JS } from '@dcloudio/uni-cli-shared'
import { APP_CSS_JS } from './appCss'
export function uniMainJsPlugin() {
......@@ -13,12 +13,12 @@ export function uniMainJsPlugin() {
? createApp(code)
: createLegacyApp(code)
return {
code: `import './pages.json.js';` + code,
code: `import './${PAGES_JSON_JS}';` + code,
map: { mappings: '' },
}
}
return {
code: `import './pages.json.js';import('${APP_CSS_JS}').then(()=>{})`,
code: `import './${PAGES_JSON_JS}';import('${APP_CSS_JS}').then(()=>{})`,
map: { mappings: '' },
}
}
......
......@@ -8,6 +8,7 @@ import {
parseManifestJsonOnce,
getLocaleFiles,
normalizeAppNVuePagesJson,
MANIFEST_JSON_JS,
} from '@dcloudio/uni-cli-shared'
export function uniPagesJsonPlugin(): Plugin {
......@@ -44,7 +45,7 @@ export function uniPagesJsonPlugin(): Plugin {
})
return {
code:
`import './manifest.json.js'\n` +
`import './${MANIFEST_JSON_JS}'\n` +
normalizeAppNVuePagesJson(pagesJson),
map: { mappings: '' },
}
......
......@@ -99,6 +99,7 @@ export async function buildApp(options: CliOptions) {
return buildManifestJson()
}
if (process.env.UNI_RENDERER === 'native') {
process.env.UNI_COMPILER = 'nvue'
return buildByVite(
addConfigFile(
extend(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册