Closed jani-kasa closed 4 years ago
@jani-kasa Woah, that's a lot of work, thank you!
and the extracted data will be example.json
But with a timestamp, if it's enabled, right?
@jani-kasa The PR marked as WIP, are you planning to add something? I'll merge after some testing, alright?
Do you know about native payload-extractor implementation in beta version of Nuxt though? My component will be deprecated eventually, in favor of the native feature which supports subFolders=false: https://github.com/nuxt/nuxt.js/pull/6159/files#diff-4ddfa243e02d885643040d0baeea50a3R211
and the extracted data will be example.json
But with a timestamp, if it's enabled, right?
Yeah, if timestamp is enabled it will be appended to it.
Do you know about native payload-extractor implementation in beta version of Nuxt though? My component will be deprecated eventually, in favor of the native feature which supports subFolders=false: https://github.com/nuxt/nuxt.js/pull/6159/files#diff-4ddfa243e02d885643040d0baeea50a3R211
Yes, I've heard of it, but I don't want to use the beta version, and needed this to work before that...
Thanks for testing, and let me know if anything needs to be fixed!
@jani-kasa Hey, I can't get it working (at least with local-module approach) - it crashes with ./helpers module not found
. Can you clarify your testing method, maybe I'm doing something wrong?
@jani-kasa Hey, I can't get it working (at least with local-module approach) - it crashes with
./helpers module not found
. Can you clarify your testing method, maybe I'm doing something wrong?
So sorry, I forgot to push up my fixes after introducing the extracted helpers from the plugins🤦‍♂️ I added them now, it should be good now!
I started the Nuxt server in one terminal with npm run dev
and then generated the static files using npm run generate
, and worked fine for me
@jani-kasa Hey. It didn't work until I added a fix: route: route.path
. Because $payloadURL(route) route argument should be an object with path inside, not the path itself... I know it was a weird decision but we have to keep it this way for backward compatibility.
Can you test it again on your side? It seems to be working for me now.
Hello! Thanks you for this package, very useful. I wanted to use it with
subFolders
set to false, so updated the code for that.It works the same as before if
subFolders
is not set tofalse
. If thesubFolders
options is set tofalse
the generated files will be the same as the page's name. So for example for/example
route the generated html will beexample.html
the JS file will beexample.js
and the extracted data will beexample.json
. (for the index route,/
it will use theindex.js
andindex.json
files).