install icon indicating copy to clipboard operation
install copied to clipboard

Replace file

Open Akryum opened this issue 9 years ago • 3 comments

I don't see a way to replace a file with new content (for example, to hot reload modules). Is it currently possible? Maybe we could have an option like forceReplace?

Akryum avatar Sep 29 '16 14:09 Akryum

Here's the line where we ignore new contents for files that have already been installed.

I'm definitely interested in this idea, and my use case is the same as yours (hot module replacement). I wonder what minimal hooks we could support to enable hot module replacement, so that we don't have to implement that logic in this package. At minimum, I think we should reuse the module object from the previous version of the module.

benjamn avatar Sep 29 '16 14:09 benjamn

What I'm trying to do is replace an installed file with meteorInstall. Currently, my workaround is to change the filename with a timestamp, but this leads to unexpected side effects.

Akryum avatar Sep 29 '16 14:09 Akryum

@benjamn I known that it is about 3 years old topic. But maybe you have any ideas how to do it properly? Any idea about hooks?

afrokick avatar Sep 27 '22 18:09 afrokick