From bd949a533d8d6a63821d64597098035dc4374926 Mon Sep 17 00:00:00 2001 From: erha19 Date: Fri, 18 Jan 2019 16:49:30 +0800 Subject: [PATCH] bugfix(compile): fix replace path logic on windows --- packages/@weex/plugins/compile/src/WeexBuilder.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@weex/plugins/compile/src/WeexBuilder.ts b/packages/@weex/plugins/compile/src/WeexBuilder.ts index 30a9fee..27e589c 100644 --- a/packages/@weex/plugins/compile/src/WeexBuilder.ts +++ b/packages/@weex/plugins/compile/src/WeexBuilder.ts @@ -210,7 +210,7 @@ new Vue(App) let result = {} entries.forEach(entry => { const extname = path.extname(entry) - const basename = entry.replace(`${base}/`, '').replace(extname, '') + const basename = entry.replace(`${base}${this.isWin ? '\\' : '/'}`, '').replace(extname, '') const templatePathForWeb = path.resolve(this.vueTemplateFloder, basename + '.web.js') const templatePathForNative = path.resolve(this.vueTemplateFloder, basename + '.js') if (isweb) {