Closed linh1987 closed 5 years ago
I will add more unit tests later if needed.
@linh1987 a fix for an array entry has been already added. https://github.com/gajus/isomorphic-webpack/commit/867b3f680375f30d0e58daa0b10ee641055adb4d Sorry, I have made the change before I saw your pull-request.
However, I appreciate the fix for windows support.
I am leaving this open until you confirm that it is ready for a review.
@gajus it's completely fine. I updated the code to run correctly against the unit tests now. I feel the context check / test is a bit wonky (since path.dirname('/bar')
returns '/' anyway, the parentFilename parameter for that test is a bit meaningless). What do you think?
Other than that it should be my final feature commit for this PR and you can review it.
@linh1987 can you rebase against the master and see if the changes continue to work? I have made some changes that could be platform specific.
I managed to merge but I don't know if i'm using the package right anymore. should I use the new evalBundleCode callback? it failed at jsdom.changeURL(window, windowUrl);
where windowUrl is '/' @gajus
Please add more information about:
it failed at jsdom.changeURL(window, windowUrl); where windowUrl is '/' @gajus
I will improve the documentation. Generally, you need to call evalBundleCode
only once if your application is not aware of the URL (ie, it does not perform routing). If it does perform routing, then you need to call if before each HTTP request.
@linh1987 Did my comment clear things up?
Thank you for coming back to this, @linh1987!
@gajus hey. sorry my work life took me away from this. I will get this finished (hopefully) in a few days.
I added a few fixes and improvement to how isomorphic-webpack handling webpack configuration and cross environment path handling. It works fine with my private project as well as isomorphic-webpack-demo (a manual change in webpack version is needed).
I will put more comments in individual changes. But the biggest one is normalize path formats (".\something\something") to linux style path ("./something/something") so requestMap matching can work properly.
I'm in a bit rush with my work so the code is not as cleaned as it could be so feel free to comment.