Skip to content

Commit

Permalink
fix(vite): build executor should not overwrite package.json in dist (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-stepanenko authored Apr 26, 2023
1 parent e4aad48 commit 2d78de5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/vite/src/executors/build/build.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ export async function* viteBuildExecutor(

const libraryPackageJson = resolve(projectRoot, 'package.json');
const rootPackageJson = resolve(context.root, 'package.json');
const distPackageJson = resolve(normalizedOptions.outputPath, 'package.json');

// For buildable libs, copy package.json if it exists.
if (
!existsSync(distPackageJson) &&
existsSync(libraryPackageJson) &&
rootPackageJson !== libraryPackageJson
) {
Expand Down

1 comment on commit 2d78de5

@vercel
Copy link

@vercel vercel bot commented on 2d78de5 Apr 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx.dev
nx-dev-git-master-nrwl.vercel.app
nx-dev-nrwl.vercel.app
nx-five.vercel.app

Please sign in to comment.