Skip to content

Commit

Permalink
fix: Unshift preview route instead of pushing
Browse files Browse the repository at this point in the history
  • Loading branch information
atinux committed Jan 29, 2020
1 parent bd9fd8e commit 78c28ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function install(moduleOptions) {
src: path.join(__dirname, 'templates/pages/preview.vue'),
});
this.extendRoutes((routes, resolve) => {
routes.push({
routes.unshift({
name: 'prismic-preview',
path: options.preview,
component: resolve(this.options.buildDir, 'prismic/pages/preview.vue'),
Expand Down

1 comment on commit 78c28ba

@hypervillain
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mmh, so I guess nuxt generate takes the first matching route to build the dist html file?
I'm curious to know what happens there exactly, great job anyway 👍

Please sign in to comment.