我想使用此plugin。要预呈现我的一些<= 200
组件。
我的项目结构是<=
vue.js
我的组件位于Laravel 5.4
我在├── app
├── artisan
├── bootstrap
├── resources
├── assets
js
app.js
bootstrap.js
components
webpackconfig.js
中添加了此内容,尝试渲染与components
路由关联的组件。
webpackconfig.js
生成的文件index.html包含/
我应该怎样做才能预渲染我的组件?
答案 0 :(得分:1)
按照文档示例进行操作。您使用了错误的路径,请使用../dist
代替./dist
new PrerenderSpaPlugin(
// Path to compiled app
path.join(__dirname, '../dist'),
// List of endpoints you wish to prerender
[ '/' ]
)
答案 1 :(得分:0)
您应该定位index.html
入口点的正确路径
您目前正在定位dist
文件夹。