Просмотр исходного кода

chore: Fix issues with build configs

Michael Bromley 1 год назад
Родитель
Сommit
d184e4d36f

+ 1 - 0
packages/cli/tsconfig.json

@@ -2,6 +2,7 @@
   "extends": "../../tsconfig.json",
   "compilerOptions": {
     "moduleResolution": "node",
+    "module": "CommonJS",
     "declaration": true,
     "removeComments": true,
     "strictPropertyInitialization": false,

+ 2 - 0
packages/create/tsconfig.json

@@ -1,6 +1,8 @@
 {
   "extends": "../../tsconfig.json",
   "compilerOptions": {
+    "module": "CommonJS",
+    "moduleResolution": "node",
     "declaration": true,
     "removeComments": false,
     "noLib": false,

+ 1 - 1
packages/harden-plugin/src/types.ts

@@ -1,4 +1,4 @@
-import { ComplexityEstimator } from 'graphql-query-complexity/dist/cjs/QueryComplexity';
+import { ComplexityEstimator } from 'graphql-query-complexity';
 
 /**
  * @description

+ 1 - 1
packages/testing/src/test-server.ts

@@ -109,7 +109,7 @@ export class TestServer {
     ): Promise<INestApplication> {
         const config = await preBootstrapConfig(userConfig);
         Logger.useLogger(config.logger);
-        const appModule = await import('@vendure/core/dist/app.module');
+        const appModule = await import('@vendure/core/dist/app.module.js');
         try {
             DefaultLogger.hideNestBoostrapLogs();
             const app = await NestFactory.create(appModule.AppModule, {

+ 2 - 2
scripts/check-angular-versions.ts

@@ -8,8 +8,8 @@ import path from 'path';
  * See https://github.com/vendure-ecommerce/vendure/issues/758 for more on this issue.
  */
 async function checkAngularVersions() {
-    const adminUiPackageJson = await import('../packages/admin-ui/package.json');
-    const uiDevkitPackageJson = await import('../packages/ui-devkit/package.json');
+    const adminUiPackageJson = require('../packages/admin-ui/package.json');
+    const uiDevkitPackageJson = require('../packages/ui-devkit/package.json');
 
     const angularCompilerPackages = ['@angular/cli', '@angular/compiler-cli', '@angular/compiler'];
     const illegalSemverPrefixes = /^[~^]/;

+ 2 - 2
tsconfig.json

@@ -1,7 +1,7 @@
 {
   "compilerOptions": {
-    "module": "commonjs",
-    "moduleResolution": "Node",
+    "module": "NodeNext",
+    "moduleResolution": "NodeNext",
     "noLib": false,
     "skipLibCheck": true,
     "lib": ["es2019", "esnext.asynciterable"],