Open manniL opened 5 years ago
@manniL Aggree. But if nuxt will have simillar core functionality, I can't be sure that this module will be demanded. And if nobody needs it, tests are useless... Let me finish commercial projects and then I'll return to this issue. Thanks for feedback!
@DreaMinder I agree. When (at some time) "full static mode" would be part of the core then this module would be obsolete.
Really great job on this module @DreaMinder, I plan to test it on nuxtjs.org to start working on the native implementation for Nuxt.js :)
@Atinux OMG. I'll work on it this evening, minor fixes should be done
Awesome :)
The only bug I found right now is the payload.json
that is empty everytime
@Atinux I've fixed payload.json issue with temporary hack, see it works here: https://github.com/DreaMinder/nuxtjs.org
For some reason data fields inside of payload is array of objects. And nuxt-documentation project has data stored in second object. When I'll figure out why, I'll probably find a better solution. UPD: got it, it is so because of nested routes
Hi! 👋 Awesome work!
As I tested the module today, I didn't noticed any issues with empty payload.json files. Even for nested routes.
Are there still known bugs? Is the package suitable for production?
@robertpiosik Hi! Cool, glad you like it. Yes, bug with empty payload is fixed a month ago. There may be issues if you are using vuex to fetch data, or router base to make prefix for all URLs. And as there are no tests yet, compability issues may appear with new nuxt version.
I'd use this module for production if I'd need to. But so far, the only real project I know using it is https://tobias-thiele.de/ (https://github.com/DreaMinder/nuxt-payload-extractor/issues/2).
I'll try to add some tests ! @Atinux you confirmed Nuxt will crawl all pages for generating routes ? Will this feature (extract payload) be released with ?
The payload.json
file is a real data saving !
@edimitchel nice, thanks! But...
Will this feature (extract payload) be released with ?
after you and me faced nested-routes bug, I don't think it is a good idea. Because in current implementation, I don't see any way to solve it. Maybe it should be moved to core, where its possible to get nesting-level of current route... Or hooks API should be modified to do so if its possible.
I suggested this question because a comment made by @Atinux on https://github.com/nuxt/rfcs/issues/22#issuecomment-499075927
- Use our crawler in union with generate.routes (crawler already working on https://github.com/nuxt/nuxtjs.org/blob/master/modules/crawler/index.js) and move it inside @nuxt/generator
Hey :wave:
I think some tests for the package would come handy :relaxed: