fix(core): esbuild generateLockfile according to docs (#18413)
This commit is contained in:
parent
48deaec60f
commit
a5d6a293aa
@ -51,7 +51,10 @@ describe('EsBuild Plugin', () => {
|
|||||||
|
|
||||||
expect(runCommand(`node dist/libs/${myPkg}/index.cjs`)).toMatch(/Hello/);
|
expect(runCommand(`node dist/libs/${myPkg}/index.cjs`)).toMatch(/Hello/);
|
||||||
// main field should be set correctly in package.json
|
// main field should be set correctly in package.json
|
||||||
checkFilesExist(`dist/libs/${myPkg}/package.json`);
|
checkFilesExist(
|
||||||
|
`dist/libs/${myPkg}/package.json`,
|
||||||
|
`dist/libs/${myPkg}/pnpm-lock.yaml`
|
||||||
|
);
|
||||||
expect(runCommand(`node dist/libs/${myPkg}`)).toMatch(/Hello/);
|
expect(runCommand(`node dist/libs/${myPkg}`)).toMatch(/Hello/);
|
||||||
|
|
||||||
expect(runCommand(`node dist/libs/${myPkg}/index.cjs`)).toMatch(/Hello/);
|
expect(runCommand(`node dist/libs/${myPkg}/index.cjs`)).toMatch(/Hello/);
|
||||||
|
|||||||
@ -85,6 +85,7 @@ export async function* esbuildExecutor(
|
|||||||
...options,
|
...options,
|
||||||
// TODO(jack): make types generate with esbuild
|
// TODO(jack): make types generate with esbuild
|
||||||
skipTypings: true,
|
skipTypings: true,
|
||||||
|
generateLockfile: true,
|
||||||
outputFileExtensionForCjs: getOutExtension('cjs', options),
|
outputFileExtensionForCjs: getOutExtension('cjs', options),
|
||||||
excludeLibsInPackageJson: !options.thirdParty,
|
excludeLibsInPackageJson: !options.thirdParty,
|
||||||
updateBuildableProjectDepsInPackageJson: externalDependencies.length > 0,
|
updateBuildableProjectDepsInPackageJson: externalDependencies.length > 0,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user