vadimdemedes / ink

🌈 React for interactive command-line apps
https://term.ink
MIT License
26.42k stars 593 forks source link

Fix devtools import in production #597

Closed eXhumer closed 1 year ago

eXhumer commented 1 year ago

webpack bundler sets the process.env.NODE_ENV to production when mode is set to production in webpack config file. My aim with this commit is to skip devtools injection and import in production mode.

vadimdemedes commented 1 year ago

This would be a breaking change. Can you set DEV=false environment variable in your webpack config, so it strips out this code the same way?