Skip to content

Commit

Permalink
Merge branch 'next' into feat/h5_api_impl
Browse files Browse the repository at this point in the history
  • Loading branch information
Chen-jj authored Apr 13, 2022
2 parents 53de070 + a510b90 commit 048fa1e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/taro-mini-runner/src/plugins/MiniPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,8 @@ export default class TaroMiniPlugin {
if (independentPackages.size) {
independentPackages.forEach((pages, name) => {
const childCompiler = compilation.createChildCompiler(PLUGIN_NAME, {
path: `${compiler.options.output}/${name}`
path: `${compiler.options.output.path}/${name}`,
jsonpFunction: `${compiler.options.output.jsonpFunction}/${name}`
})
const compPath = path.resolve(__dirname, '..', 'template/comp')
childCompiler.inputFileSystem = compiler.inputFileSystem
Expand Down Expand Up @@ -971,14 +972,15 @@ export default class TaroMiniPlugin {
}
})
this.pages.forEach(page => {
const importBaseTemplatePath = promoteRelativePath(path.relative(page.path, path.join(sourceDir, this.getTemplatePath(baseTemplateName))))
let importBaseTemplatePath = promoteRelativePath(path.relative(page.path, path.join(sourceDir, this.getTemplatePath(baseTemplateName))))
const config = this.filesConfig[this.getConfigFilePath(page.name)]
let isIndependent = false
let independentName = ''
this.independentPackages.forEach((pages, name) => {
if (pages.includes(page.path)) {
isIndependent = true
independentName = name
importBaseTemplatePath = promoteRelativePath(path.relative(page.path, path.join(sourceDir, name, this.getTemplatePath(baseTemplateName))))
}
})
if (config) {
Expand Down

0 comments on commit 048fa1e

Please sign in to comment.