diff --git a/packages/chameleon-loader/src/load-icon.js b/packages/chameleon-loader/src/load-icon.js index c3f081736ba1b47ea43063e76c875bc9f145f4e7..843b7d8f930df3060f75d7eaad0ef183bdfac262 100644 --- a/packages/chameleon-loader/src/load-icon.js +++ b/packages/chameleon-loader/src/load-icon.js @@ -38,6 +38,8 @@ _.getTabbarIconPaths = function(tabbar, type) { iconInfo.finalPath = item.iconPath; iconPaths.push(iconInfo); + // 生成的app.json中的路径要适配windows + item.iconPath = cmlUtils.handleWinPath(item.iconPath); } if (item.selectedIconPath) { let iconInfo = {}; @@ -46,6 +48,8 @@ _.getTabbarIconPaths = function(tabbar, type) { iconInfo.finalPath = item.selectedIconPath; iconPaths.push(iconInfo); + // 生成的app.json中的路径要适配windows + item.selectedIconPath = cmlUtils.handleWinPath(item.selectedIconPath); } }) } @@ -58,6 +62,9 @@ _.getTabbarIconPaths = function(tabbar, type) { iconInfo.finalPath = item.icon; iconPaths.push(iconInfo); + + // 生成的app.json中的路径要适配windows + item.icon = cmlUtils.handleWinPath(item.icon); } if (item.activeIcon) { let iconInfo = {}; @@ -66,6 +73,9 @@ _.getTabbarIconPaths = function(tabbar, type) { iconInfo.finalPath = item.activeIcon; iconPaths.push(iconInfo); + + // 生成的app.json中的路径要适配windows + item.activeIcon = cmlUtils.handleWinPath(item.activeIcon); } }) } diff --git a/packages/chameleon-tool/configs/getWebCommonConfig.js b/packages/chameleon-tool/configs/getWebCommonConfig.js index 1a3fc4f66d8d35ead0afda51d032a73734e70347..9d2fe21f4a947576b060b074369f033e6516f015 100644 --- a/packages/chameleon-tool/configs/getWebCommonConfig.js +++ b/packages/chameleon-tool/configs/getWebCommonConfig.js @@ -60,7 +60,8 @@ module.exports = function (options) { context: path.resolve(root), entry, output: { - filename: getJsPath() + filename: getJsPath(), + chunkFilename: getJsPath() }, resolve: { alias: {