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

[FEAT] support content style HMR #610

Open
3 of 4 tasks
hg2990656 opened this issue Jun 1, 2023 · 3 comments
Open
3 of 4 tasks

[FEAT] support content style HMR #610

hg2990656 opened this issue Jun 1, 2023 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed hmr

Comments

@hg2990656
Copy link

How do you envision this feature/change to look/work like?

Why can't plasmo support content style HMR? When I modify the css file in content, I need to reload the plugin.

What is the purpose of this change/feature? Why?

Improve development efficiency

(OPTIONAL) Example implementations

No response

(OPTIONAL) Contribution

  • I would like to contribute to this RFC via a PR

Verify canary release

  • I verified that the issue exists in plasmo canary release

Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I checked the current issues for duplicate problems.
@hg2990656 hg2990656 added the enhancement New feature or request label Jun 1, 2023
@louisgv
Copy link
Contributor

louisgv commented Jun 1, 2023

@hg2990656 can you give me more info about your setup?

@hg2990656
Copy link
Author

@hg2990656 can you give me more info about your setup?

node version:18.16.0
pnpm version: 8.5.1

My operation steps:

  1. pnpm install -g plasmo,plasmo version is 0.73.1
  2. pnpm create plasmo --with-content-scripts-ui
  3. pnpm dev
  4. add extension to chrome
  5. modify the background to blue in plasmo-overlay.css
  6. refresh the page, but color is not changed, then reload the plugin, color is changed

@louisgv
Copy link
Contributor

louisgv commented Jun 7, 2023

Related: parcel-bundler/parcel#6506

This is a bug with the inline resolver - it inline the bundle but doesn't contain a backward dependency reference, causing the livereload to not be able to tell where it came from.

Solution down the line is to fork the inline resolver and make sure it points to the correct root dependency or something along that line. Otherwise, the cs won't know if that file belonged in its dependency tree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed hmr
Projects
None yet
Development

No branches or pull requests

2 participants