callstack / callstack/super-app-example
ReferenceError: Can't find variable: __webpack_require__
- 主要言語
- Java
- スター
- 40
- フォーク
- 23
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
**Environment**
`Host app`
React Native: 0.72.3
Repack: 3.7.0
Webpack: 5.91.0
OS: MacOS 13.6.3 - Chip M1 Pro
Xcode: 15.2
**Description**
I've cloned your repo, I move into `host-app`, setup environment callstack/repack. I stop `metro` and run `react-native webpack-start` with host is my IP Address but it show this, i think it doesn't receive the `webpack local`
Thank you.
Here is my `index.js`
```
import {AppRegistry} from 'react-native';
import App from './src/App';
import {name as appName} from './app.json';
import {ScriptManager, Federated} from '@callstack/repack/client';
ScriptManager.shared.addResolver(async (scriptId, caller) => {
const resolveURL = Federated.createURLResolver({
containers: {
MiniApp: 'http://localhost:9000/[name][ext]',
},
});
const url = resolveURL(scriptId, caller);
if (url) {
return {
url,
query: {
platform: Platform.OS,
},
};
}
});
ScriptManager.shared.on('resolving', (...args) => {
console.log('DEBUG/resolving', ...args);
});
ScriptManager.shared.on('resolved', (...args) => {
console.log('DEBUG/resolved', ...args);
});
ScriptManager.shared.on('prefetching', (...args) => {
console.log('DEBUG/prefetching', ...args);
});
ScriptManager.shared.on('loading', (...args) => {
console.log('DEBUG/loading', ...args);
});
ScriptManager.shared.on('loaded', (...args) => {
console.log('DEBUG/loaded', ...args);
});
ScriptManager.shared.on('error', (...args) => {
console.log('DEBUG/error', '111111111111');
console.log('DEBUG/error', ...args);
});
AppRegistry.registerComponent(appName, () => App);
```
コントリビューションガイド
調査の方向性
host-app/index.js から開始し、報告されたホスト設定を使用して React Native 0.72.3、Re.Pack 3.7.0、webpack-start で問題を再現します。報告された __webpack_require__ エラーの周辺にある webpack の起動とバンドル読み込みの経路を追跡します。ホストアプリが ReferenceError なしで起動し、ローカルの webpack バンドルを受信できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, react-native, webpack
- 領域
- build-system, mobile
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 30/100