-
Notifications
You must be signed in to change notification settings - Fork 47
Updates to make watchify work #64
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
Conversation
+ using a different kind of tranform that ends the stream correctly + inject require statements for composed css modules, so that they are added to browserify's dependency graph + clear token cache so that we can rebuild the parts that change
Just moving my comment in here from #63 since they were in the wrong place. This PR works for any new changes, but there appears to be a cache which causes changes it has previously rendered, to not cause an update.
|
It appears to be a bug with |
Another issue, this doesn't appear to be picking up changes in files that are imported via |
@snikch yeah I noticed that one too :| Will check the I'll look closer at the Would you mind sending me a gist or something of the case you're seeing it in? |
@joeybaker I'll take a closer look at Definitely though let's revisit this once we have it working and see if a cleaner solution is available. |
Got a few minutes to look at this now, here's what I'm seeing:
Will have a crack at fixing this now |
+ using a local copy of file-system-loader for now (will move over to css-modules-loader-core later) + file-system-loader uses dependency-graph to record dependencies + removed dedupeSources (no longer needed) + global transform is optional (false by default) + updated tests to match
I've made some updates in and I think we're nearing a solution. I've removed deduping and used a better approach for keeping track of dependencies. @snikch / @joeybaker / @markuplab / @justgook / @tinchoz49 - if you have a few moments to try out this PR it would really help make sure we've got all of the bases covered. I think it's working well for the main case but want to make sure we cover a wide range. - Thanks |
need to try.. |
Works for me, as expected.. minimal changes in code, and works like charm - as soon as it will be merged will push updates to my repo
|
hi @joshwnj, yes no problem! thanks for you effort! (checking...) |
Looking really healthy @joshwnj! I can confirm that both of the issues I was facing are resolved 👌. I'll be using it over the next few hours so I'll be back if I hit any snags. |
works ok to me! 👍 this is a great project and great idea by the way! now my problem is the issue 65 :( |
Ok, so I've only come across one issue. If you are composing another file and the class doesn't yet exist, then creating it in the composed file won't correctly update. I seem to need to save the file that composes the other again to get the update to show. Steps to reproduce.
|
Thanks for the report @snikch - I'm able to see that bug too. I have a solution in mind that I think will fix the problem and also be an overall improvement: if we can intercept the css while it's still in icss form we'll have a really nice bridge between css and js, converting the icss imports/exports into js imports/exports. Will let you know if I'm able to get that working. |
i think about |
about @snikch report - i think it is different story, that can be opened as different bug, because that PR is stopper to use tool in real development. |
Ok, I'm going to move ahead with this PR and lodge a new issue for dealing with undefined composition, as @justgook suggested. I can still see a way forward here but after looking into it, it seems like it will involve reaching pretty deep into css modules stuff and I'd rather take the time to do it right. @snikch in the meantime I've made an update so it will display an error message in the case you outlined. Thanks everyone for your input here |
👌 thanks @joshwnj |
Publised v0.16.0 Closes #63 |
Thanks @joshwnj! |
added to browserify's dependency graph