mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
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
30 lines
788 B
TypeScript
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')
|
|
})
|
|
})
|