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

chore: add error log when entryPagePath not found

上级 187e7827
const DEFAULT_KEYS = [ const DEFAULT_KEYS = [
'VUE2',
'VUE3',
'MP', 'MP',
'APP', 'APP',
'APP-PLUS-NVUE', 'APP-PLUS-NVUE',
...@@ -25,6 +27,8 @@ module.exports = function initPreprocess (name, platforms, userDefines = {}) { ...@@ -25,6 +27,8 @@ module.exports = function initPreprocess (name, platforms, userDefines = {}) {
defaultContext[normalize(name)] = false defaultContext[normalize(name)] = false
}) })
defaultContext.VUE2 = true
vueContext[normalize(name)] = true vueContext[normalize(name)] = true
if (name === 'app-plus') { if (name === 'app-plus') {
......
...@@ -76,6 +76,7 @@ export function initEntryPage () { ...@@ -76,6 +76,7 @@ export function initEntryPage () {
const entryRoute = '/' + entryPagePath const entryRoute = '/' + entryPagePath
const routeOptions = __uniRoutes.find(route => route.path === entryRoute) const routeOptions = __uniRoutes.find(route => route.path === entryRoute)
if (!routeOptions) { if (!routeOptions) {
console.error(`[uni-app] ${entryPagePath} not found...`)
return return
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册