First of all, is this plugin support multi-page app?
My project is some subpages of our main website. so this project has no index route.
But the plugin runs error with notice: can not find /path/to/project/index.html.
So i add an empty entry for index route (every page's entry file provide a variable for this pages content).
Entries looks like this: (in index page, the value of content and title variable is empty string)
import { config, startApp } from "../main";
// different pages import their own file
const {
content,
title,
} = require("@/assets/articles/copyright-dispute-policy");
startApp({
...config,
provide: {
content,
title,
},
});
After compile without prerender-spa-plugin, the output file runs good. Every pages import their own script, like this:
But if I import this plugin, the output files goes wrong, all html files look the same, they import the same script as index route, like this:
So the pages title and content is empty string.
this is what my vue.config.js file looks like.
Pages config:
Plugin config:
I don't know if my codes wrong or plugin don't support multi-page app.
Please help me, thanks a lot.
First of all, is this plugin support multi-page app?
My project is some subpages of our main website. so this project has no index route. But the plugin runs error with notice: can not find /path/to/project/index.html. So i add an empty entry for index route (every page's entry file provide a variable for this pages content). Entries looks like this: (in index page, the value of content and title variable is empty string)
After compile without prerender-spa-plugin, the output file runs good. Every pages import their own script, like this:![image](https://user-images.githubusercontent.com/19836250/123358007-3d4d7400-d59d-11eb-90e4-b700fe65cb00.png)
But if I import this plugin, the output files goes wrong, all html files look the same, they import the same script as index route, like this:![image](https://user-images.githubusercontent.com/19836250/123358159-856c9680-d59d-11eb-9af0-e87cc759cc3e.png)
So the pages title and content is empty string.
this is what my vue.config.js file looks like. Pages config:![image](https://user-images.githubusercontent.com/19836250/123358273-c5337e00-d59d-11eb-9cbe-1e262d2844a0.png)
Plugin config:![image](https://user-images.githubusercontent.com/19836250/123358322-db413e80-d59d-11eb-8881-903e3032ad4e.png)
I don't know if my codes wrong or plugin don't support multi-page app. Please help me, thanks a lot.