From 42fb647632cdda32ac6956dd959b59fff8d44ba9 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Tue, 2 May 2023 14:02:22 +0100 Subject: [PATCH 1/2] test: test with bundler module resolution --- test/fixtures/basic/nuxt.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/fixtures/basic/nuxt.config.ts b/test/fixtures/basic/nuxt.config.ts index 59b947e0f7e5..cc8d3af1de18 100644 --- a/test/fixtures/basic/nuxt.config.ts +++ b/test/fixtures/basic/nuxt.config.ts @@ -17,7 +17,7 @@ export default defineNuxtConfig({ compilerOptions: { // TODO: For testing (future) support for Node16-style module resolution. // See https://github.com/nuxt/nuxt/issues/18426 and https://github.com/nuxt/nuxt/pull/18431 - // moduleResolution: 'Node16' + moduleResolution: 'bundler' } } }, From 00a404619462bc892f32042be48a76c7d14febf6 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 4 May 2023 10:20:44 +0100 Subject: [PATCH 2/2] ci: test both node + bundler module resolution --- .github/workflows/ci.yml | 6 ++++++ test/fixtures/basic/nuxt.config.ts | 4 +--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0be1236496e9..47f545dd6538 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,6 +67,10 @@ jobs: timeout-minutes: 10 needs: - build + strategy: + fail-fast: false + matrix: + module: ['bundler', 'node'] steps: - uses: actions/checkout@v3 @@ -87,6 +91,8 @@ jobs: - name: Test (types) run: pnpm test:types + env: + MODULE_RESOLUTION: ${{ matrix.module }} lint: # autofix workflow will be triggered instead for PRs diff --git a/test/fixtures/basic/nuxt.config.ts b/test/fixtures/basic/nuxt.config.ts index cc8d3af1de18..c9325385d8d5 100644 --- a/test/fixtures/basic/nuxt.config.ts +++ b/test/fixtures/basic/nuxt.config.ts @@ -15,9 +15,7 @@ export default defineNuxtConfig({ strict: true, tsConfig: { compilerOptions: { - // TODO: For testing (future) support for Node16-style module resolution. - // See https://github.com/nuxt/nuxt/issues/18426 and https://github.com/nuxt/nuxt/pull/18431 - moduleResolution: 'bundler' + moduleResolution: process.env.MODULE_RESOLUTION } } },