Open MrXyfir opened 6 years ago
Think that the first issue with UglifyJS is related to not #708 in the marks-pane package and not in epubjs
In react-reader
I am also a consumer of epubjs#v3 and I do set a global Epub var in the usage here:
https://github.com/gerhardsletten/react-reader/blob/master/src/EpubView/EpubView.js
Also, Continuous scrolling is breaking the navigation via the ToC, after navigating to the CFI the book keeps loading the previous page until it reach the first page of the book.
package.json's
main
property should point to file indist/
It should point to
dist/epub.js
ordist/epub.min.js
.By default you might end up with errors during your build process (UglifyJS in my case). The error I get is
Unexpected token: name (f)
which referenceslet f = parseFloat(n)
in theisFloat
function.Currently using
import EPUB from 'epubjs/dist/epub';
as a workaround.2018-01-05 update - This is actually causing another issue
WARNING in ./node_modules/epubjs/dist/epub.js
...Module not found: Error: Can't resolve 'JSZip' in 'node_modules/epubjs/dist'
. This issue only seems to popup on my production server (Ubuntu) and not on my development system (Windows 10). So now I'm back to using justimport EPUB from 'epubjs';
and then not using UglifyJS until I can figure out a better solution. And yes, JSZip is installed.2018-01-06 update - So it turns out Webpack v3 uses an old version of UglifyJS which doesn't support ES6. The solution until Webpack v4 is released is to use this plugin directly, instead of the built-in version of UglifyJS. Combined with the normal
import EPUB from 'epubjs'
, everything is working.Loading books from blob urls
This worked in v0.2, in v0.3, EPUB.JS treats a blob url (
blob:https://example.com/c1b1bf9a-f3b4-4859-b492-55576c3f64a4
) as a directory. Maybe this isn't much of an issue since you can pass blobs directly but still would be nice if it handled it correctly.Lots of things break when
window.ePub
is not setI was originally importing EPUBJS where needed and using the variable created during the import but this causes a handful of issues that seem to mostly revolve around Managers / Views. I didn't look too deeply into this.
Currently doing
import EPUB from 'epubjs/dist/epub';
and thenwindow.ePub = EPUB
to fix this.Book never becomes ready if
ePub()
is not passed an options objectNot sure why this is.
const book = ePub(someUrl)
would never resolve theready
promise, whileePub(someUrl, {})
works fine.Books with large chapters cause extreme lag
I've created a new issue for this. #714
Resizing does not work properly
Width is set to height: https://github.com/futurepress/epub.js/blob/v0.3/src/rendition.js#L491
Also having problems getting this to work even with setting
book.rendition.settings.width|height
and callingbook.rendition.manager.resize
manually. I think the problem is updateLayout() seems to reset the height/width and ignore whatever you set.Upgrading from v0.2 to v0.3 has been painful...
Also, can we get an update on what the current status of v0.3 is and when it will move out of beta to replace v0.2? What's the status of v0.4? Is v0.3 complete now?