Skip to content
This repository was archived by the owner on Feb 24, 2023. It is now read-only.

Commit 2d87014

Browse files
committed
fix(Page extensions): Use argument input for resolving next config path
refs #6
1 parent db24a86 commit 2d87014

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

example/next.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
pageExtensions: [".ts", ".tsx", ".js", ".jsx"]
3+
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "next-route-manifest",
33
"description": "Generate route manifest for Next.js",
4-
"version": "0.2.0",
4+
"version": "0.2.1",
55
"bin": {
66
"next-route-manifest": "./bin/run"
77
},

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class GenerateRouteManifest extends Command {
2929

3030
let config: NextConfigWithPageExtensionsOnly = defaultConfig
3131
try {
32-
config = require(path.resolve(input, 'next.config.js'))
32+
config = require(path.resolve(flags.input, 'next.config.js'))
3333
} catch {
3434
this.warn('next.config.js file not found. Using default value')
3535
}

0 commit comments

Comments
 (0)