相关平台
微信小程序
小程序基础库: 3.4.6
使用框架: React
复现步骤
mini:{ webpackChain(chain) {
chain.resolve.plugin('tsconfig-paths').use(TsconfigPathsPlugin);
chain.merge({
optimization: {
splitChunks: {
cacheGroups: {
echartChunkName: {
name: 'echartChunkName' ,
test: /[\/]ec-canvas[\/]echarts.js/,
priority: 50,
}
}
}
}
});
},
addChunkPages(pages, pageNames) {
pages.set("pages/index/index", ['echartChunkName'])
}
}
期望结果
dist中生成echartChunkName.js文件
实际结果
dist中无echartChunkName.js文件
环境信息
Taro CLI 3.6.28 environment info:
System:
OS: Windows 10 10.0.19045
Binaries:
Node: 18.17.0 - E:\nvm\node.js\node.EXE
Yarn: 1.22.22 - E:\nvm\node_global\yarn.CMD
npm: 9.6.7 - E:\nvm\node.js\npm.CMD
npmPackages:
@tarojs/cli: 3.6.28 => 3.6.28
@tarojs/components: 3.6.28 => 3.6.28
@tarojs/helper: 3.6.28 => 3.6.28
@tarojs/plugin-framework-react: 3.6.28 => 3.6.28
@tarojs/plugin-html: 3.6.28 => 3.6.28
@tarojs/plugin-platform-alipay: 3.6.28 => 3.6.28
@tarojs/plugin-platform-h5: 3.6.28 => 3.6.28
@tarojs/plugin-platform-jd: 3.6.28 => 3.6.28
@tarojs/plugin-platform-qq: 3.6.28 => 3.6.28
@tarojs/plugin-platform-swan: 3.6.28 => 3.6.28
@tarojs/plugin-platform-tt: 3.6.28 => 3.6.28
@tarojs/plugin-platform-weapp: 3.6.28 => 3.6.28
@tarojs/react: 3.6.28 => 3.6.28
@tarojs/runtime: 3.6.28 => 3.6.28
@tarojs/shared: 3.6.28 => 3.6.28
@tarojs/taro: 3.6.28 => 3.6.28
@tarojs/taro-loader: 3.6.28 => 3.6.28
@tarojs/webpack5-runner: 3.6.28 => 3.6.28
babel-preset-taro: 3.6.28 => 3.6.28
eslint-config-taro: 3.6.28 => 3.6.28
react: ^18.0.0 => 18.3.1
2条答案
按热度按时间r6vfmomb1#
omtl5h9j2#
这配置同事的mac系统可以用,我这个windows系统不能