Skip to content

Commit 36d2b72

Browse files
committed
add regression test for #38854
1 parent 95313a4 commit 36d2b72

File tree

5 files changed

+46
-0
lines changed

5 files changed

+46
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import helloWorldString from 'pkg/sub-export'
2+
3+
export default function Page() {
4+
return <p>{helloWorldString}</p>
5+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"name": "pkg",
3+
"version": "1.0.0",
4+
"type": "module",
5+
"exports": {
6+
"./sub-export": "./src/some-file.js"
7+
}
8+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
declare const _default: 'Hello, world'
2+
export default _default
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export default 'Hello, world'
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { createNextDescribe, FileRef } from 'e2e-utils'
2+
import { join } from 'path'
3+
4+
// regression test suite for https://github.com/vercel/next.js/issues/38854
5+
createNextDescribe(
6+
'Does not override tsconfig during build',
7+
{
8+
packageJson: { type: 'module' },
9+
files: {
10+
'tsconfig.json': new FileRef(join(__dirname, 'tsconfig.json')),
11+
pages: new FileRef(join(__dirname, 'pages')),
12+
pkg: new FileRef(join(__dirname, 'pkg')),
13+
},
14+
// skipStart: true,
15+
dependencies: {
16+
typescript: 'latest',
17+
'@types/react': 'latest',
18+
'@types/node': 'latest',
19+
pkg: './pkg',
20+
},
21+
},
22+
({ next }) => {
23+
it('boots and renders without throwing an error', async () => {
24+
// dummy test for now - not sure why this is failing on `next build`,
25+
// as I can cd into the isolated next install and run `next build`
26+
// without issue...
27+
await next.render$('/')
28+
})
29+
}
30+
)

0 commit comments

Comments
 (0)