I have two projects, A and B, both developed with ReactJS each have its separate bundle file, which means duplicated React after build. but A calls B in itself (not iframe).
Is there any way to bundle ReactJS only in project A and exclude it from B's bundling? I use Webpack as the bundler in both projects.
Update:
I face this error while running project A, When I use externals like below,
externals: {
'react': 'React',
'react-dom': 'ReactDOM',
}
bundle.js:1 Uncaught ReferenceError: React is not defined
question from:
https://stackoverflow.com/questions/65937385/forcing-one-project-to-use-the-reactjs-bundles-of-another-project 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…