repack icon indicating copy to clipboard operation
repack copied to clipboard

Getting Blank Screen - After using ChunkManager.configure

Open dinesh-dealsandyou opened this issue 3 years ago • 0 comments

Environment

Platform : IOS with latest version of repack 2.5.2

Description

We are using code splitting with reference to this https://re-pack.netlify.app/docs/code-splitting/usage

We are able to generate bundle in development mode using below given command: npx react-native webpack-bundle --entry-file index.js --bundle-output temp/groups.bundle

The bundles are getting generated properly & even it's working fine on local system too, but when we try to load the bundles on the fly using below given code, it doesn't seems to be working.

// start: code for download bundle import { ChunkManager } from '@callstack/repack/client'; ChunkManager.configure({ forceRemoteChunkResolution: true, resolveRemoteChunk: async (chunkId) => { return { url: https://youthcrush.com/dineshtest/bundle/remote/${chunkId}, }; }, }); // end: code for download bundle

If we comment above given code, it works fine. The complete code is written inside App.js (default file). We are also sharing the below given bundle files which we uploaded on the remote server:

https://youthcrush.com/dineshtest/bundle/remote/MyChunk_js.chunk.bundle https://youthcrush.com/dineshtest/bundle/remote/MyChunk_js.chunk.bundle.json https://youthcrush.com/dineshtest/bundle/remote/MyChunk_js.chunk.bundle.map

Please help......

dinesh-dealsandyou avatar Aug 05 '22 14:08 dinesh-dealsandyou