diff --git a/packages/js/src/generators/library/files/lib/tsconfig.json__tmpl__ b/packages/js/src/generators/library/files/lib/tsconfig.json__tmpl__ index da6f51affaaa6..8d27bd10719eb 100644 --- a/packages/js/src/generators/library/files/lib/tsconfig.json__tmpl__ +++ b/packages/js/src/generators/library/files/lib/tsconfig.json__tmpl__ @@ -1,7 +1,7 @@ { "extends": "<%= rootTsConfigPath %>", "compilerOptions": { - "module": "CommonJS"<% if (js) { %>, + "module": "commonjs"<% if (js) { %>, "allowJs": true<% } %> }, "files": [], diff --git a/packages/js/src/generators/library/library.spec.ts b/packages/js/src/generators/library/library.spec.ts index bcda94e582795..2ca0b02e7c4dd 100644 --- a/packages/js/src/generators/library/library.spec.ts +++ b/packages/js/src/generators/library/library.spec.ts @@ -140,7 +140,7 @@ describe('lib', () => { Object { "compilerOptions": Object { "forceConsistentCasingInFileNames": true, - "module": "CommonJS", + "module": "commonjs", "noFallthroughCasesInSwitch": true, "noImplicitOverride": true, "noImplicitReturns": true, diff --git a/packages/nest/src/generators/library/__snapshots__/library.spec.ts.snap b/packages/nest/src/generators/library/__snapshots__/library.spec.ts.snap index 46914eaad4728..4adc174f94238 100644 --- a/packages/nest/src/generators/library/__snapshots__/library.spec.ts.snap +++ b/packages/nest/src/generators/library/__snapshots__/library.spec.ts.snap @@ -40,7 +40,7 @@ exports[`lib --testEnvironment should set target jest testEnvironment to node by exports[`lib --unit-test-runner none should not generate test configuration 1`] = ` Object { "compilerOptions": Object { - "module": "CommonJS", + "module": "commonjs", }, "extends": "../../tsconfig.base.json", "files": Array [], @@ -70,7 +70,7 @@ Object { exports[`lib nested should create a local tsconfig.json 1`] = ` Object { "compilerOptions": Object { - "module": "CommonJS", + "module": "commonjs", }, "extends": "../../../tsconfig.base.json", "files": Array [], @@ -102,7 +102,7 @@ export class MyLibModule {} exports[`lib not nested should create a local tsconfig.json 1`] = ` Object { "compilerOptions": Object { - "module": "CommonJS", + "module": "commonjs", }, "extends": "../../tsconfig.base.json", "files": Array [],