ts-file-router 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/file-router.js +2 -2
- package/package.json +1 -1
package/dist/file-router.js
CHANGED
|
@@ -30,9 +30,9 @@ const serializeRoutes = (obj, ident = 2) => {
|
|
|
30
30
|
};
|
|
31
31
|
const start = ({ baseFolder, outputFile, routeFileName = 'page.ts', }) => {
|
|
32
32
|
// Get the pages dir to resolve routes
|
|
33
|
-
const basePath = path_1.default.resolve(
|
|
33
|
+
const basePath = path_1.default.resolve(process.cwd(), baseFolder);
|
|
34
34
|
// Output file for routes
|
|
35
|
-
const output = path_1.default.resolve(
|
|
35
|
+
const output = path_1.default.resolve(process.cwd(), outputFile);
|
|
36
36
|
const generateRouter = async () => {
|
|
37
37
|
const mapRoutes = async (dir) => {
|
|
38
38
|
const routes = {};
|