Skip to content
This repository was archived by the owner on Oct 13, 2020. It is now read-only.

Commit b931614

Browse files
author
Cristian Pallarés
committed
fix: find the index route path correctly
1 parent f79df2c commit b931614

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/module.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
const path = require("path");
22
const fs = require("fs-extra");
33

4-
module.exports = function() {
4+
module.exports = function () {
55
if (this.options.dev) {
66
this.extendRoutes((routes, resolve) => {
7+
const index = routes.find(route => route.path === "/");
78
routes.push({
9+
...index,
810
path: process.env.RENDER_PATH,
9-
component: resolve(this.options.srcDir, "pages/index.vue"),
1011
});
1112
});
1213
return;

0 commit comments

Comments
 (0)