-
Notifications
You must be signed in to change notification settings - Fork 513
How to detect when new text was extracted in watch mode? #577
Comments
@wmertens seems add event is good solution. Can your write PR this for this? |
@evilebottnawi I'd gladly create a PR but I don't know how to know when a text file was changed. |
@wmertens in theory we can store hash of extracted files and when compare them with new extracted files, what do your think about this? |
If you are already creating a hash, that would be great; if not, it seems
that there could be a more direct way somehow? Like keeping a list of files
that were output in this compile?
…On Fri, Aug 18, 2017 at 12:48 PM Evilebot Tnawi ***@***.***> wrote:
@wmertens <https://github.com/wmertens> in theory we can store hash of
extracted files and when compare them with new extracted files, what do
your think about this?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#577 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADWllQ7zWR-VRPxaSPfRfUGjxEopQXWks5sZWvlgaJpZM4OfQ_e>
.
|
@wmertens we already have content have https://github.com/webpack-contrib/extract-text-webpack-plugin/blob/master/src/index.js#L209 |
@wmertens btw can your describe more informatively why it is needs? |
It seems that hash only gets created on-demand, so it would be a shame to
create it every time…
I tried to describe my use case above. I need to know when a CSS file was
emitted, so that I can tell the browser to hot-reload it. Right now I'm hot
reloading every time, which is annoying…
…On Fri, Aug 18, 2017 at 1:14 PM Evilebot Tnawi ***@***.***> wrote:
@wmertens <https://github.com/wmertens> btw can your describe more
informatively why it is needs?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#577 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADWlsEI5l7lqpaW_UdDMLTEYdIV1mhjks5sZXIvgaJpZM4OfQ_e>
.
|
@wmertens why don't store hash of files directly in |
If I can get the hashes of all files after a compile was done, and know which ones were generated by extract-text-plugin, that would be great. Then I can indeed track hashes and emit on change. But I don't know how to do that, which events to listen to… |
ETWP entered maintenance mode and won't receive any feature updates, please open an issue in |
Uh oh!
There was an error while loading. Please reload this page.
I'm trying to do hot reloading of extracted CSS (so that dev and prod have the exact same CSS), and that's working, but I'm having trouble figuring out when there was a change to the CSS.
I tried attaching to "after-emit", but I can't really see what I should filter on to detect if a css file was rebuilt in the current compilation run.
Any hints? Maybe a special event should be emitted?
The text was updated successfully, but these errors were encountered: