meteor / meteor-feature-requests

A tracker for Meteor issues that are requests for new functionality, not bugs.
Other
89 stars 3 forks source link

HMR support for package changes #426

Open arggh opened 3 years ago

arggh commented 3 years ago

Hot module replacement doesn't work when the changed file is in a package. This is with zodern:melte.

/app
/packages
../ui
  ../Box.svelte

When I edit Box.svelte, which is imported in app, the app reloads completely.

I have also set up a symlink from /app/imports/ pointing to → /packages/ui according to previous guidance on how to get Meteor to reload those packages when they are changed.

The version of Meteor showing the problem: 2.1

The operating system you're running Meteor on: MacOS Big Sur (M1)

The expected behavior: I'd expect a hot module replacement to happen

The actual behavior: The whole app reloads

A simple reproduction: https://github.com/arggh/meteor-hmr-issue

filipenevola commented 3 years ago

Hi @arggh, as explained in the PR about HMR the support to changes inside packages is not available yet.

From the original PR https://github.com/meteor/meteor/pull/11117:

A partial list of situations it falls back to hot code push:

- Files were modified that do not have a module id, are bare, are json data, or do not have meteorInstallOptions
- Modules were removed from the bundle
- A package was modified
arggh commented 3 years ago

Hi @arggh, as explained in the PR about HMR the support to changes inside packages is not available yet.

Duly noted 👍