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

hot reload for changes in extension dependencies #185

Open
tomlinton opened this issue Jun 22, 2022 · 3 comments
Open

hot reload for changes in extension dependencies #185

tomlinton opened this issue Jun 22, 2022 · 3 comments

Comments

@tomlinton
Copy link
Contributor

Is there already a way to do this? I didn't dig into the webpack config but out of the box it doesn't seem to support it. Would be useful after #183.

@armaniferrante
Copy link
Member

armaniferrante commented Jun 22, 2022

Is there already a way to do this? I didn't dig into the webpack config but out of the box it doesn't seem to support it. Would be useful after #183.

You can try running yarn start in the packages you want to hot reload.

@wentokay
Copy link
Collaborator

wentokay commented Jun 23, 2022

iirc, if you are running yarn start on the extension and then in a separate terminal cd into the package that you've changed and yarn build it should pick up the changes and reload. Definitely not perfect though. We could probably have webpack watch the other dirs, or use a different bundler altogether.

One of the motivations for #183 was to extract themes as they're being referenced in two packages now and I think yarn might've been relying on some mutations (side-effects) on the mui packages. I'll explain exactly what seemed to be happening in a future comment.

@wentokay
Copy link
Collaborator

For reference I've tried getting this extension working with esbuild, parcel-webextension and vite-.

webpack + swr-loader seemed to be the only thing that worked without major issues, but I also think there's a long way to go here for a smooth and fast dev experience

The older, more reliable methods for HMR in extensions were broken in chrome manifest v3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants