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

[BUG] HMR not detecting changes in local workspace packages #1031

Open
2 of 3 tasks
lucky-bai opened this issue Jul 18, 2024 · 3 comments
Open
2 of 3 tasks

[BUG] HMR not detecting changes in local workspace packages #1031

lucky-bai opened this issue Jul 18, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@lucky-bai
Copy link

What happened?

Plasmo HMR does not work when changes are made in a local workspace package. Steps to reproduce:

  1. Set up a Plasmo project and add a local package dependency using pnpm workspaces. The package.json for the plasmo project contains the local foo dependency with the following configuration:
{
  "dependencies": {
    "foo": "workspace:*"
  }
}
  1. Run Plasmo in development mode. Then, make a change to the local foo package.
  2. Result: The changes are only picked up when they are made in the Plasmo project itself, but not when the changes are in the local foo package.

A similar setup in a Next.js project works correctly, with changes in local packages being picked up and reloaded as expected.

Plasmo version: 0.88.0.

Version

Latest

What OS are you seeing the problem on?

Linux

What browsers are you seeing the problem on?

Chrome

Relevant log output

No response

(OPTIONAL) Contribution

  • I would like to fix this BUG via a PR

Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I checked the current issues for duplicate problems.
@lucky-bai lucky-bai added the bug Something isn't working label Jul 18, 2024
@karthest
Copy link

I assume that you have a plasmo project A first and then move it to /packages and try to use another package B located in /packages right ?

@lucky-bai
Copy link
Author

My pnpm-workspace.yaml is as follows:

packages:
    - "common"
    - "nextjs"
    - "plasmo-extension"

In the root directory, plasmo-extension has a dependency on common. However, when I make a change in common, plasmo HMR does not trigger.

@karthest
Copy link

In my case it works as expected (plasmo versoin 0.88.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants