Skip to content
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

RN The official scaffolding project introduced bundlejs and modified it again, but the hot update could not be triggered #1288

Open
nianxiongdi opened this issue Jun 13, 2024 · 2 comments

Comments

@nianxiongdi
Copy link

  1. install project
npx react-native@latest init AwesomeProject
  1. Description
    Introduced in app.tsx. official scaffolding、official scaffolding、official scaffolding、official scaffolding
const infos = require('./infos')



const App = () => {

  <View>

  <<infos />
</view>
}
     
export default App;
  1. Modify file A and cannot trigger hot.

  2. I would like to ask how to trigger my bundlejs file through metro and trigger hot update again.

  3. Thank you very much.

@nianxiongdi nianxiongdi changed the title RN The official scaffolding project introduced bundlejs and modified it again, but the hot update could not be triggered #44890 RN The official scaffolding project introduced bundlejs and modified it again, but the hot update could not be triggered Jun 13, 2024
@nianxiongdi
Copy link
Author

// source code of metro
const inject = ({ module: [id, code], sourceURL }) => {
  if (global.globalEvalWithSourceUrl) {
    global.globalEvalWithSourceUrl(code, sourceURL);
  } else {
    eval(code);
  } 
};

during the second update code, it was found that the code and sourceURL were the latest, but the original components were used when rendering. The component is not updated.

@Blackgan3
Copy link

same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants