Skip to content

Commit

Permalink
fix page directory prefix (#77)
Browse files Browse the repository at this point in the history
fixes #76
  • Loading branch information
tatethurston authored Oct 5, 2022
1 parent 740c61b commit 4c3e7a1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ You can pass the following options to `withRoutes` in your `next.config.js`:

```js
const withRoutes = require("nextjs-routes/config")({
outDir: "types"
outDir: "types",
});
```

Expand Down
2 changes: 1 addition & 1 deletion e2e/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ export function writeNextjsRoutes(options: NextJSRoutesOptions): void {
const ext = file.slice(file.lastIndexOf(".") + 1);
return pageExtensions.has(ext);
});
const routes = nextRoutes(files, outputFilepath);
const routes = nextRoutes(files, opts.pagesDirectory);
const generated = generate(routes);

writeFileSync(outputFilepath, generated);
Expand Down

0 comments on commit 4c3e7a1

Please sign in to comment.