diff --git a/packages/vite/src/executors/build/build.impl.ts b/packages/vite/src/executors/build/build.impl.ts index bd5b0cd8bd3fa4..e5f8e9eb369941 100644 --- a/packages/vite/src/executors/build/build.impl.ts +++ b/packages/vite/src/executors/build/build.impl.ts @@ -129,7 +129,7 @@ export async function* viteBuildExecutor( } ); - builtPackageJson.type = 'module'; + builtPackageJson.type ??= 'module'; writeJsonFile( `${outDirRelativeToWorkspaceRoot}/package.json`,