Don't listen to port in production
Closed this issue · 0 comments
hkdobrev commented
Type:
- bug
- feature
- enhancement
- question
Environment:
- OS: macOS 10.3
- Version: 0.6.7
Going to open a PR:
- yes
- no
Description:
Currently, the plugin is still not easy to use without conditions in the Webpack configuration. In the readme it says:
Note: the plugin only works on development mode, so don't forget to set the NODE_ENV before run the command above
Here's the related code in the script:
webpack-chrome-extension-reloader/src/ChromeExtensionReloader.ts
Lines 26 to 36 in 3655ee7
Although, it doesn't try to reload the Chrome extension in production mode, it still connects to the port and so you need to still add conditionals in the webpack configuration file if you're using the same configuration across environments.