create-guten-block icon indicating copy to clipboard operation
create-guten-block copied to clipboard

Support external React components

Open genseirin opened this issue 6 years ago • 2 comments

Could you please add support for React and ReactDOM as externals? I am using externals: { ‘react’: ‘React’, ‘react-dom’: ‘ReactDOM’, }, in module.exports = { … } of webpack.config.dev/prod.js .

It would be great if that setting could be part of the default so that it survives updates (without ejecting).

(Refering to https://www.cssigniter.com/how-to-use-external-react-components-in-your-gutenberg-blocks/)

genseirin avatar May 14 '18 19:05 genseirin

@ecobux Would love this feature. Can you send in a PR and also explain how you tested it. The webpack configs are here https://github.com/ahmadawais/create-guten-block/tree/master/packages/cgb-scripts/config

ahmadawais avatar May 15 '18 09:05 ahmadawais

Thank you, @ahmadawais ! Not sure if you need more than just manual testing.

genseirin avatar May 15 '18 15:05 genseirin