How does templates directory end up in dist of the create-next-app package? #78075
-
SummaryIn the package.json of create-next-app (v15.3.1-canary.6), the scripts are as follows:
The But the published package on npm contains the Owing to which part of the release process did this happen? Additional informationNo response ExampleNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi,
I figured out from here:
So, the |
Beta Was this translation helpful? Give feedback.
Hi,
ncc
uses this tool, webpack-asset-relocator-loader, which figures out what static files are needed for the output build to function correctly. That's what's copying the files into/fromtemplate
.I figured out from here:
next.js/packages/create-next-app/templates/index.ts
Lines 68 to 69 in 9db9b6f
So, the
README.md
files, would be ignored by this tool, that's why they called themREADME-template.md
, so that they are copied into thedist
folder, and then when y…