Skip to content

Commit

Permalink
Merge pull request #1358 from didi/fix-2.9-i18n-web
Browse files Browse the repository at this point in the history
fix: app注入方式
  • Loading branch information
hiyuki authored Dec 11, 2023
2 parents 4c788de + 25c4af2 commit 323e80e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/webpack-plugin/lib/web/processMainScript.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ module.exports = function (script, {
output += ` import Vue from 'vue'
import VueRouter from 'vue-router'
import Mpx from '@mpxjs/core'
import App from ${stringifyRequest(loaderContext, addQuery(resource, { isApp: true }))}
import { processAppOption, getComponent } from ${stringifyRequest(loaderContext, optionProcessorPath)}
Vue.use(VueRouter)\n`

Expand All @@ -64,6 +63,9 @@ module.exports = function (script, {
isMain: true,
globalTabBar
})

output += `\n const App = require(${stringifyRequest(loaderContext, addQuery(resource, { isApp: true }))}).default\n`

output += `
export default processAppOption({
App,
Expand Down

0 comments on commit 323e80e

Please sign in to comment.