diff --git a/packages/taro-mini-runner/src/plugins/MiniPlugin.ts b/packages/taro-mini-runner/src/plugins/MiniPlugin.ts index f0bf69f69055..11acca1ba9e6 100644 --- a/packages/taro-mini-runner/src/plugins/MiniPlugin.ts +++ b/packages/taro-mini-runner/src/plugins/MiniPlugin.ts @@ -735,10 +735,10 @@ export default class MiniPlugin { relativePath = item.replace(this.sourceDir, '') } const extname = path.extname(item) - const templatePath = relativePath.replace(extname, MINI_APP_FILES[buildAdapter].TEMPL) - const jsonPath = relativePath.replace(extname, MINI_APP_FILES[buildAdapter].CONFIG) - const scriptPath = relativePath.replace(extname, MINI_APP_FILES[buildAdapter].SCRIPT) - const stylePath = relativePath.replace(extname, MINI_APP_FILES[buildAdapter].STYLE) + const templatePath = relativePath.replace(extname, MINI_APP_FILES[buildAdapter].TEMPL).replace(/\\/g, '/') + const jsonPath = relativePath.replace(extname, MINI_APP_FILES[buildAdapter].CONFIG).replace(/\\/g, '/') + const scriptPath = relativePath.replace(extname, MINI_APP_FILES[buildAdapter].SCRIPT).replace(/\\/g, '/') + const stylePath = relativePath.replace(extname, MINI_APP_FILES[buildAdapter].STYLE).replace(/\\/g, '/') const itemInfo = taroFileTypeMap[item] let template = itemInfo.template if (!isQuickApp) {