Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup Bundling Issues #49

Closed
ISNIT0 opened this issue Mar 25, 2020 · 2 comments
Closed

Rollup Bundling Issues #49

ISNIT0 opened this issue Mar 25, 2020 · 2 comments

Comments

@ISNIT0
Copy link

ISNIT0 commented Mar 25, 2020

It seems various configurations of Rollup cause this code to be generated:

Iterator.prototype.peekLength = function () {
    if (this.ops[this.index]) {
        // Should never return 0 if our index is being managed correctly
        return Op_1$1.default.length(this.ops[this.index]) - this.offset;
    }
    else {
        return Infinity;
    }
};

Which at runtime throws:

TypeError: Cannot read property 'length' of undefined

This seems to be because there is a cyclic import which Rollup is barfing at:

Circular dependency: node_modules/quill-delta/dist/Op.js -> node_modules/quill-delta/dist/Iterator.js -> node_modules/quill-delta/dist/Op.js

🚀 PR incoming

@jhchen jhchen closed this as completed Apr 30, 2020
@ISNIT0
Copy link
Author

ISNIT0 commented Apr 30, 2020

In case anyone else has this same issue, I ended up cheating - used browserify to create a dist file and imported that.

@shamoons
Copy link

Can you please expand on how you solved this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants