-
-
Notifications
You must be signed in to change notification settings - Fork 455
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
Nextjs 12 plugin version for manual regerneration of page ISR #2494
Comments
I will be attempting to work on that, with the help of @Misfits09 and @alexandrepernin! Stay tuned. 🤗 |
Thank you very much guys! :) |
Any news guys? :) |
I was able to get manual regeneration running after following issue #2417. The regeneratePage function shown below is run for each page in my /api/revalidate endpoint. You will need to npm/yarn add/install @sls-next/lambda-at-edge
|
Hey @GlennStreetman thanks for sharing the example. Where do I get the params |
I added each of the above to my .env file. These names didn't exist before my first deploy so i had to deploy serverless, go into the AWS console and update my variables, then update my .env file and redeploy. Remember that for this to all work you will need to make sure permissions are all setup correctly in IAM for Lambda, S3, and SMS. |
@GlennStreetman i think i understand the code, but im confused, how does this work my homepage js file for example is located at \static\chunks\pages\index-a29c946d7927b337.js i can deploy this function as a lambda and call it successfully and send the SQS message but the regeneration lambda can't process the messaage because it cannot find the js file Is it meant to find the js file inside the chunks folder? if so, how does it know which one it is with just the page name? |
update: disregard my last comment, sls-next is doing something to find the right js file, my issue was with having dynamically generated pages but @GlennStreetman what is the usage of the counter? i see it being passed around |
@GlennStreetman thanks for your insight here. Would you be able to share a code snippet of how you're calling this within the /api/revalidate endpoint? @apollisa any update on an official update to the serverless-nextjs project? |
@ba221400 The API endpoint shown below is called by Strapi CMS. staticRoutes & revalidateLookup is specific to my small hobby app. Your mapping will definitely be different. The "const update = " is cleanup needed for my particular use case. Hope this helps.
|
Hello,
when will the plugin version for nextjs 12 come out?
We would need it for the manual page regeneration feature
Thank you very much :)
The text was updated successfully, but these errors were encountered: