1
1
tests :
2
- # - name: with-js-config-object-style
3
- # config: |
4
- # /** @type {import('next').NextConfig} */
5
- # const nextConfig = {
6
- # reactStrictMode: true,
7
- # async headers() {
8
- # return [
9
- # {
10
- # source: '/:path*',
11
- # headers: [
12
- # {
13
- # key: 'x-custom-header',
14
- # value: 'js-config-value',
15
- # },
16
- # {
17
- # key: 'x-config-type',
18
- # value: 'object',
19
- # },
20
- # ],
21
- # },
22
- # ];
23
- # },
24
- # };
2
+ - name : with-js-config-object-style
3
+ config : |
4
+ /** @type {import('next').NextConfig} */
5
+ const nextConfig = {
6
+ reactStrictMode: true,
7
+ async headers() {
8
+ return [
9
+ {
10
+ source: '/:path*',
11
+ headers: [
12
+ {
13
+ key: 'x-custom-header',
14
+ value: 'js-config-value',
15
+ },
16
+ {
17
+ key: 'x-config-type',
18
+ value: 'object',
19
+ },
20
+ ],
21
+ },
22
+ ];
23
+ },
24
+ };
25
25
26
- # module.exports = nextConfig;
27
- # file: next.config.js
28
- # - name: with-js-config-function-style
29
- # config: |
30
- # /** @type {import('next').NextConfig} */
31
- # const nextConfig = (phase, { defaultConfig }) => {
32
- # return {
33
- # reactStrictMode: true,
34
- # async headers() {
35
- # return [
36
- # {
37
- # source: '/:path*',
38
- # headers: [
39
- # {
40
- # key: 'x-custom-header',
41
- # value: 'js-config-value',
42
- # },
43
- # {
44
- # key: 'x-config-type',
45
- # value: 'function',
46
- # },
47
- # ],
48
- # },
49
- # ];
50
- # }
51
- # };
52
- # };
26
+ module.exports = nextConfig;
27
+ file : next.config.js
28
+ - name : with-js-config-function-style
29
+ config : |
30
+ /** @type {import('next').NextConfig} */
31
+ const nextConfig = (phase, { defaultConfig }) => {
32
+ return {
33
+ reactStrictMode: true,
34
+ async headers() {
35
+ return [
36
+ {
37
+ source: '/:path*',
38
+ headers: [
39
+ {
40
+ key: 'x-custom-header',
41
+ value: 'js-config-value',
42
+ },
43
+ {
44
+ key: 'x-config-type',
45
+ value: 'function',
46
+ },
47
+ ],
48
+ },
49
+ ];
50
+ }
51
+ };
52
+ };
53
53
54
- # module.exports = nextConfig;
55
- # file: next.config.js
56
- # - name: with-js-async-function
57
- # config: |
58
- # // @ts-check
54
+ module.exports = nextConfig;
55
+ file : next.config.js
56
+ - name : with-js-async-function
57
+ config : |
58
+ // @ts-check
59
59
60
- # module.exports = async (phase, { defaultConfig }) => {
61
- # /**
62
- # * @type {import('next').NextConfig}
63
- # */
64
- # const nextConfig = {
65
- # async headers() {
66
- # return [
67
- # {
68
- # source: '/:path*',
69
- # headers: [
70
- # {
71
- # key: 'x-custom-header',
72
- # value: 'js-config-value',
73
- # },
74
- # {
75
- # key: 'x-config-type',
76
- # value: 'function',
77
- # },
78
- # ],
79
- # },
80
- # ];
81
- # }
82
- # }
83
- # return nextConfig
84
- # }
85
- # file: next.config.js
60
+ module.exports = async (phase, { defaultConfig }) => {
61
+ /**
62
+ * @type {import('next').NextConfig}
63
+ */
64
+ const nextConfig = {
65
+ async headers() {
66
+ return [
67
+ {
68
+ source: '/:path*',
69
+ headers: [
70
+ {
71
+ key: 'x-custom-header',
72
+ value: 'js-config-value',
73
+ },
74
+ {
75
+ key: 'x-config-type',
76
+ value: 'function',
77
+ },
78
+ ],
79
+ },
80
+ ];
81
+ }
82
+ }
83
+ return nextConfig
84
+ }
85
+ file : next.config.js
86
86
- name : with-ts-config
87
87
config : |
88
88
import type { NextConfig } from 'next'
@@ -105,40 +105,40 @@ tests:
105
105
106
106
export default nextConfig
107
107
file : next.config.ts
108
- # - name: with-ecmascript-modules
109
- # config: |
110
- # // @ts-check
108
+ - name : with-ecmascript-modules
109
+ config : |
110
+ // @ts-check
111
111
112
- # /**
113
- # * @type {import('next').NextConfig}
114
- # */
115
- # const nextConfig = {
116
- # /* config options here */
117
- # async headers() {
118
- # return [
119
- # {
120
- # source: '/:path*',
121
- # headers: [
122
- # {
123
- # key: 'x-custom-header',
124
- # value: 'mjs-config-value',
125
- # },
126
- # ],
127
- # },
128
- # ];
129
- # }
130
- # }
112
+ /**
113
+ * @type {import('next').NextConfig}
114
+ */
115
+ const nextConfig = {
116
+ /* config options here */
117
+ async headers() {
118
+ return [
119
+ {
120
+ source: '/:path*',
121
+ headers: [
122
+ {
123
+ key: 'x-custom-header',
124
+ value: 'mjs-config-value',
125
+ },
126
+ ],
127
+ },
128
+ ];
129
+ }
130
+ }
131
131
132
- # export default nextConfig
133
- # file: next.config.mjs
134
- # - name: with-empty-config
135
- # config: |
136
- # // @ts-check
132
+ export default nextConfig
133
+ file : next.config.mjs
134
+ - name : with-empty-config
135
+ config : |
136
+ // @ts-check
137
137
138
- # /** @type {import('next').NextConfig} */
139
- # const nextConfig = {
140
- # /* config options here */
141
- # }
138
+ /** @type {import('next').NextConfig} */
139
+ const nextConfig = {
140
+ /* config options here */
141
+ }
142
142
143
- # module.exports = nextConfig
144
- # file: next.config.js
143
+ module.exports = nextConfig
144
+ file : next.config.js
0 commit comments