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:
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.