Set 'react' and 'react-dom' as externals for browserify
When browserifying anything that depends on React, don't bundle another copy of React in the file. There might be some other common dependencies that we should include here.
This commit is contained in:
parent
046637d76b
commit
963329df28
1 changed files with 5 additions and 1 deletions
|
@ -39,7 +39,11 @@ async function getBrowserify(signatures) {
|
|||
bundleFs
|
||||
.on('error', reject)
|
||||
.on('finish', resolve);
|
||||
browserify(f, config.config).bundle().pipe(bundleFs);
|
||||
browserify(f, config.config)
|
||||
.external('react')
|
||||
.external('react-dom')
|
||||
.bundle()
|
||||
.pipe(bundleFs);
|
||||
});
|
||||
|
||||
onProgress(f, dest, 'browserify');
|
||||
|
|
Loading…
Reference in a new issue