Files
Will Binns-SmithandGitHub 570266a445 Turbopack: Allow overriding tsconfig path via next-config (#77563)
This:
- Adds a test asserting the user can override the tsconfig path via the
next-config. This is already supported with Next.js and Webpack.
- Implements the necessary code to pass the test and implement support
with Turbopack.

Test Plan: `pnpm test-dev test/e2e/tsconfig-path/index.test.ts && pnpm
test-dev-turbo test/e2e/tsconfig-path/index.test.ts`

Closes PACK-4215
2025-04-01 16:08:37 -07:00

30 lines
788 B
TypeScript

import { FileRef, nextTestSetup } from 'e2e-utils'
describe('specified tsconfig', () => {
const { next, skipped } = nextTestSetup({
files: new FileRef(__dirname),
dependencies: {
typescript: '5.4.4',
},
})
if (skipped) {
return
}
it('app router: allows a user-specific tsconfig via the next config', async () => {
const html = await next.render('/')
expect(html).toContain('bar123')
})
it('pages router: allows a user-specific tsconfig via the next config', async () => {
const html = await next.render('/page')
expect(html).toContain('bar123')
})
it('middleware: allows a user-specific tsconfig via the next config', async () => {
const html = await next.render('/middleware')
expect(html).toContain('bar123')
})
})