mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
## What? Changes in #83331 accidentally changed behavior of how `tsconfig.json` is resolved. When using Next.js we don't want it to be resolved relative to the current file being compiled. It should only use the application root. This PR fixes the behavior to match what it was before and adds a test that fails if it breaks again.
16 lines
491 B
TypeScript
16 lines
491 B
TypeScript
import { nextTestSetup } from 'e2e-utils'
|
|
|
|
describe('tsconfig-no-relative-resolve', () => {
|
|
const { next } = nextTestSetup({
|
|
files: __dirname,
|
|
skipStart: true,
|
|
})
|
|
|
|
// Next.js should only use the application root tsconfig.json file and not files relative to the file being compiled.
|
|
it('should fail to build', async () => {
|
|
const { exitCode, cliOutput } = await next.build()
|
|
expect(exitCode).toBe(0)
|
|
expect(cliOutput).not.toContain('non-existent-package')
|
|
})
|
|
})
|