-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android 生成bundle的hash值似乎和android studio build出来的bundle的hash值不一致, 导致安装的第一次会进行热更新 #103
Comments
记录一下解决过程, 给有需要的同学, react native版本0.73 关于源代码相同情况下code-push-cli生成的bundle与xcode或者android编译生成的bundle不一致以下code-push-cli特指
export SOURCEMAP_FILE="$DERIVED_FILE_DIR/main.jsbundle.packager.map" 但是xcode编译完后,又会删除sourcemap,而code-push-cli会保留sourcemap并且会上传热更新服务器,这又会触发第一次热更新,调整就是不让code-push-cli上传sourcemap,而且确实没有必要
|
@JackClown Hi, same issue here, would you help me how to package bundle file ? |
@HairyRabbit sorry, mayby it's too late, here is my part of the bundle uploading script async function uploadBundle(platform, type, deployment) {
console.log(`run code-push ${platform} ${process.pleartform}`);
const args = [
'release-react',
`whs-app-${platform}`,
platform,
'-d',
deployment,
'--des',
label,
'--targetBinaryVersion',
`${version.split('.').slice(0, 2).join('.')}`,
'--outputDir',
distDir,
'--sourcemapOutput',
// 启用hermes的时候react native生成的sourcemap文件,包含了packager,并且不能把sourcemap放在CodePush目录下,否则上传到热更新服务器
path.resolve(
distDir,
`./CodePush/../${platform === 'android' ? 'index.android.bundle.packager.map' : 'main.jsbundle.packager.map'}`,
),
// 启用的hermes的时候不要压缩js bundle
'--extraBundlerOptions=--minify',
'--extraBundlerOptions=false',
'--extraHermesFlags=-O',
];
await exec('node', [path.resolve(__dirname, '../../node_modules/@shm-open/code-push-cli/bin/cli.js'), ...args]);
} you can ignore the Hope it helps |
Thanks so much for filing an issue or feature request! We will address it as soon as we can. Please follow these guidelines:
code-push-cli
orcode-push
that you are using.react-native: 0.73
请问有遇到过这种情况吗
The text was updated successfully, but these errors were encountered: