HarmonyOS RN node bundle-harmony打包babel缓存问题?

通过node构建bundle时:

node ./node_modules/react-native/local-cli/cli.js bundle-harmony --entry-file index.js --bundle-output ./CodePush/bundle.harmony.js --assets-dest ./CodePush --dev false

发现babel没有重新编译,导致通过babel的配置没有生效。

阅读 452
1 个回答

在metro.config.js文件中将resetCache设置成true:

const config = {
  resetCache: true,
  transformer: {
    ...
  },
};
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进