构建 nuxt with koa,及报错解决方案

Nuxt.js 解决了 Vue 搜索引擎爬虫抓不到这个问题,且可以提高首屏加载的速度。

Nuxt.js 从服务器请求数据,之后渲染界面。服务端渲染对 SEO 友好,在经过网络传输的时候,爬虫客户端爬到页面后会分析页面,这样页面的关键数据就会被爬虫收录。


构建命令如下:

  1. vue init nuxt-community/koa-template nuxt-learn
  2. yarn install or npm install
  3. npm run dev

出现报错

ERROR  Failed to compile with 1 errors20:10:54

 error  in ./server/index.js

Module build failed: Error: Plugin/Preset files are not allowed to export objects, only functions. In D:\vue\VueBase\nuxt-learn\node_modules\backpack-core\babel.js
    at createDescriptor (D:\vue\VueBase\nuxt-learn\node_modules\@babel\core\lib\config\config-descriptors.js:178:11)
    at D:\vue\VueBase\nuxt-learn\node_modules\@babel\core\lib\config\config-descriptors.js
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值