-
Notifications
You must be signed in to change notification settings - Fork 96
Closed
Labels
type: bugcode to address defects in shipped codecode to address defects in shipped code
Description
Summary
According to the docs, this plugin should be able to handle caching the build folder from a next exported project. However in practice, the plugin seems to be looking at the publish directory for the cache folder, which would not exist when you publish the out/ directory, like in the demo project.
In this case you would want to cache the .next/cache folder, because the .next folder is what actually gets built -- the export command pulls the data it needs from the .next folder.
Steps to reproduce
- Publish the demo export
- Go to the logs
- See that it does not cache.
Plugin version
v4.2.3
Your netlify.toml file
`netlify.toml`
[build]
command = "yarn build" # "next build && next export"
publish = "out/"
[build.environment]
NETLIFY_NEXT_PLUGIN_SKIP = "true"Builds logs (or link to your logs)
Build logs
1:38:19 PM: 2. build.command from netlify.toml
1:38:19 PM: ────────────────────────────────────────────────────────────────
[...]
1:38:19 PM:
info - using build directory: /opt/build/repo/.next
1:39:04 PM: info - Copying "static build" directory
1:39:04 PM: info - No "exportPathMap" found in "/opt/build/repo/next.config.js". Generating map from "./pages"
1:39:04 PM: info - Launching 7 workers
1:39:04 PM: info - Exporting (0/2)
1:39:04 PM: info - Copying "public" directory
1:39:05 PM: info - Exporting (2/2)
1:39:05 PM: Export successful. Files written to /opt/build/repo/out
1:39:05 PM: Done in 46.10s.
[...]
1:39:05 PM: ────────────────────────────────────────────────────────────────
1:39:05 PM: 4. @netlify/plugin-nextjs (onPostBuild event)
1:39:05 PM: ────────────────────────────────────────────────────────────────
1:39:05 PM:
1:39:05 PM: No Next.js cache to save.
1:39:05 PM:
1:39:05 PM: (@netlify/plugin-nextjs onPostBuild completed in 5ms)
1:39:05 PM:
malteschweer, mjansson94, bachmacintosh and ascorbic
Metadata
Metadata
Assignees
Labels
type: bugcode to address defects in shipped codecode to address defects in shipped code