508feef8a1
solving issue #1255 This project implements Hot Module Replacement (HMR) for a React-based Chrome extension, allowing developers to see real-time changes in their popup component without needing to refresh the entire extension. The following outlines the configuration and structure necessary for achieving this setup. #### Key Components 1. **Webpack Configuration (`webpack.config.js`)**: - Configures Webpack for development and production modes, specifying the entry point and output settings. - Enables HMR in the development server for instant updates. 2. **Entry Point (`src/popup.js`)**: - Contains the main logic for the popup component, integrating the HMR logic to allow for module updates without a full reload. 3. **Index File (`src/index.js`)**: - Updated to support HMR with checks for `module.hot`, ensuring that the component re-renders on updates without refreshing the entire popup. 4. **Package Configuration (`package.json`)**: - Includes scripts for building and serving the application, specifying configurations needed for both development and production. 5. **Development Server**: - The command `npm start` launches a development server with HMR enabled, providing a smooth development experience. #### Summary of Changes - **HMR Logic**: - Added in `popup.js` using `if (module.hot) { ... }` to ensure updates are reflected in real-time. - Implemented in `index.js` to facilitate automatic re-rendering of the popup component on code changes. - **Webpack Dev Server**: Configured with `hot: true` to support HMR functionality. - **File Structure**: Organized files into a clear structure, facilitating maintainability and ease of access. ### Benefits Implementing HMR improves the development workflow by reducing the time spent on refreshing and waiting for the extension to reload. This results in a more productive environment, allowing for faster iteration and debugging of features. |
||
---|---|---|
.github | ||
.idea | ||
browser-extension | ||
desktop-app | ||
desktop-app-legacy | ||
.all-contributorsrc | ||
.gitattributes | ||
.gitignore | ||
CONTRIBUTING.md | ||
dev.code-workspace | ||
LICENSE | ||
MAINTAINERS.md | ||
README.md | ||
SECURITY.md |
Responsively App
A must-have devtool for web developers for quicker responsive web development. 🚀Save time by becoming 5x faster!
Download Now (free!): responsively.app
Responsively App
A modified browser built using Electron that helps in responsive web development.
Features
- Mirrored User-interactions across all devices.
- Customizable preview layout to suit all your needs.
- One handy elements inspector for all devices in preview.
- 30+ built-in device profiles with option to add custom devices.
- One-click screenshot all your devices.
- Hot reloading supported for developers.
Please visit the website to know more about the application - https://responsively.app
Download
The application is available for Mac, Windows and Linux platforms. Please download it from responsively.app
Alternatively, MacOS users can use brew
brew install --cask responsively
Also, Windows users can use chocolatey
choco install responsively
or winget
:
winget install ResponsivelyApp
Linux users using an RPM Package Manager can use rpm
sudo rpm -i https://github.com/responsively-org/responsively-app/releases/download/v[VERSION]/Responsively-App-[VERSION].x86_64.rpm
otherwise download an AppImage from the releases page
Follow us on Twitter for future updates -
Browser Extension
Install the handy browser extension to easily send links from your browser to the app and preview instantly.
Issues
If you face any problems while using the application, please open an issue here - https://github.com/responsively-org/responsively-app/issues
Roadmap
Here is the roadmap of the desktop app - https://github.com/responsively-org/responsively-app/projects/12?fullscreen=true.
Gold sponsors 🥇
Become a sponsor and have your company logo here
Contribute
To get started with contributing your awesome ideas to Responsively, follow the comprehensive guide here!
Get in touch
Come say hi to us on Discord! 👋
Contributors ✨
Thanks go to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!