-
Notifications
You must be signed in to change notification settings - Fork 2
/
vue.config.js
30 lines (29 loc) · 986 Bytes
/
vue.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
const path = require("path");
const PrerenderSPAPlugin = require("prerender-spa-plugin");
const Renderer = PrerenderSPAPlugin.PuppeteerRenderer;
module.exports = {
pages: {
index: {
entry: "src/main.js",
template: "public/index.html",
filename: "index.html",
chunks: ["chunk-vendors", "chunk-common", "index"],
},
},
configureWebpack: () => {
if (process.env.NODE_ENV === "production" && process.env.CI !== "true") {
return {
plugins: [
new PrerenderSPAPlugin({
staticDir: path.join(__dirname, "dist"),
routes: ["/", "/about"],
renderer: new Renderer({
renderAfterElementExists: "#werewolves-assistant",
headless: true,
}),
}),
],
};
}
},
};