I am facing a situation where I have a package.json
file in both the root directory and the /src
folder within my projects. However, during the build process, the /src
package.json is the one that gets copied to the /dist
folder (and eventually published to Nexus).
This setup has led me to question whether this approach is the most efficient. Since I only make changes to the outermost package.json
while developing, the /src
file seems unnecessary and out of date. Managing updates for two files can be cumbersome.
My dilemma is whether I should continue maintaining both files or if it's possible to work with just the "root" package.json
.
package.json
src/
index.ts
package.json
dist/
index.d.ts
index.js
package.json //from src