Skip to content

Commit

Permalink
fix: app注入方式
Browse files Browse the repository at this point in the history
  • Loading branch information
yandadaFreedom committed Dec 11, 2023
1 parent baebbdc commit 499f9bd
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 499f9bd

Please sign in to comment.