Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hot-reload of the extension in Chrome #87

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Pictor13
Copy link

As from the title: this supports automatically reloading the extension from the build/ folder, when it see changes.

Activating a "build-when-save" functionality on their IDE, the users can just code and have the extension be automatically Built & Reloaded in Chrome, when they save some change.

Sorry if I didn't open an issue beforehand; I didn't have much to discuss, since I added the feature mainly for my own necessity.
If you think it might be worth to merge, you're welcome 🙂
Otherwise the PR can be closed and at least will be available to others that might want to use it.

1) First run a build of the app:
  yarn build

2) Then enable `Developer mode` in Chrome Extensions and `Load unpacked`
from the `./build` directory just created at point 1)

If you break the extension on the browser and it reloads wrongly you
might need to redo the previous steps for restoring a correctly running
hot-reload script.
--

TIP:
You can trigger a build command when saving files, if you use SublimeText,
just installing `SublimeOnSaveBuild` via Package Control,
and adding the config in Tool->BuildSystem->NewBuildSystem:

{
    "working_dir": "/path/to//SearchSynonyms",
    "shell_cmd": "cd $folder && yarn build"
}
($folder is a Sublime special var)

This allows you to do SaveFile->RebuildExtension->ReloadExtension
You might need to reload the current browser tabs, in otder to see
the new changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant