allanguys / font-spider-plus

font-spider-plus(字蛛+)是一个智能 WebFont 压缩工具,它能自动分析出本地页面和线上页面使用的 WebFont 并进行按需压缩。
MIT License
710 stars 51 forks source link

Unexpected token ] #10

Closed zzAutumn closed 4 years ago

zzAutumn commented 5 years ago

在生产环境 运行fsp run的时候,出现 undefined:7 ] ^ SyntaxError: Unexpected token ] in JSON at position 137 at JSON.parse (<anonymous>) at checkFile (/usr/local/lib/node_modules/font-spider-plus/bin/index.js:115:23) at doM (/usr/local/lib/node_modules/font-spider-plus/bin/index.js:133:9) at Command.<anonymous> (/usr/local/lib/node_modules/font-spider-plus/bin/index.js:49:9) at Command.listener (/usr/local/lib/node_modules/font-spider-plus/node_modules/_commander@2.19.0@commander/index.js:315:8) at Command.emit (events.js:182:13) at Command.parseArgs (/usr/local/lib/node_modules/font-spider-plus/node_modules/_commander@2.19.0@commander/index.js:654:12) at Command.parse (/usr/local/lib/node_modules/font-spider-plus/node_modules/_commander@2.19.0@commander/index.js:474:21) 还有一个问题是 localPath 是相对于根目录即vue.config.js这层么? onlinePath 则是相对于 打包好的 dist目录么?

allanguys commented 5 years ago

能发代码包看下么?