vue3.0打包后打開dist中的index.html報下列錯誤

百度了好久還是解決不了問題
Ebook.vue中代碼:
const?DOWNLOAD_URL?=?'/book.epub'
global.ePub?=?Epub
export?default?{
??methods:?{
????//?根據鏈接跳轉到指定目錄
????jumpTo?(href)?{
??????this.rendition.display(href)
??????this.menuToggle()
????},
????//?progress值為0-100
????onProgressChange?(progress)?{
??????const?precentage?=?progress?/?100
??????const?location?=?precentage?>?0???this.location.cfiFromPercentage(precentage)?:?0
??????this.rendition.display(location)
????},
????//?電子書解析和渲染
????showEpub?()?{
??????//?生成Ebook
??????this.book?=?new?Epub(DOWNLOAD_URL)
??????//?生成Rendition,通過Book.renderTo方法生成
??????this.rendition?=?this.book.renderTo('read',?{
????????width:?window.innerWidth,
????????height:?window.innerHeight
??????})
??????//?通過Rendition.display渲染電子書
??????this.rendition.display()
??????this.themes?=?this.rendition.themes
??????this.changeFontSize(this.defaultFontSize)
??????this.registerTheme()
??????this.setTheme(this.defaultTheme)
??????//?獲取location對象來實現閱讀進度功能
??????this.book.ready.then(()?=>?{
????????this.navigation?=?this.book.navigation
????????//?console.log(all)
????????//?console.log(this.navigation)
????????return?this.book.locations.generate()
??????}).then(result?=>?{
????????this.location?=?this.book.locations
????????this.bookAvailable?=?true
??????})
????}vue.config.js中代碼:
const?path?=?require('path')
function?resolve?(dir)?{
??return?path.join(__dirname,?dir)
}
module.exports?=?{
??chainWebpack:?(config)?=>?{
????config.resolve.alias
??????.set('src',?resolve('src'))
??????.set('styles',?resolve('src/assets/styles'))
??????.set('components',?resolve('src/components'))
??},
??devServer:?{
????host:?'0.0.0.0',
????port:?8080
??},
??publicPath:?'./'
}不知道哪里出了問題,求救?。?!
2019-09-11
您好,請問您這個問題解決了嘛,我也遇到這個問題了。。。項目著急上線,能回復一下嘛