meteor-feature-requests icon indicating copy to clipboard operation
meteor-feature-requests copied to clipboard

HMR support for package changes

Open arggh opened this issue 4 years ago • 2 comments

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

arggh avatar Mar 21 '21 11:03 arggh

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

filipenevola avatar Mar 25 '21 15:03 filipenevola

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

Duly noted 👍

arggh avatar Mar 25 '21 18:03 arggh