outputFileTracingIncludes in app directory routes #55228
Replies: 2 comments
-
|
+1 |
Beta Was this translation helpful? Give feedback.
-
|
It has been a year, and I was able to get this working after some trial/error. const config = {
experimental: {
outputFileTracingIncludes: {
'/api/nft': ['./src/asset/path/*'],
},
},
};I tried https://nextjs.org/docs/app/api-reference/next-config-js/output#how-it-works Note: The vercel.json functions Further, the project I was working on had another issue where a |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I've yet to figure out a way to force files to be included in the output file tracing for a given path. In the page directory, I was able to do something like this:
In the app directory, doing something like this in the new API route handler doesn't work:
I used
/api/post/routesince it's the name of the file that was traced, and after looking into itsnft.jsonfile, the wasm files never appeared.From looking at the Next.js source code, I get a sense that this is a feature that's only available in the pages directory:
Is it true that this is only available in pages directory? Any plan to enable this in the app directory as well?
Beta Was this translation helpful? Give feedback.
All reactions