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

Fix source maps generation for the UMD build. #991

Merged
merged 4 commits into from
Aug 28, 2024

Conversation

filipsobol
Copy link
Member

@filipsobol filipsobol commented Aug 27, 2024

Suggested merge commit message (convention)

Fix (build-tools): Fixed source maps generation for the UMD build. Fixes ckeditor/ckeditor5#16984.

Feature (build-tools): Introduced a new loadSourcemaps plugin for loading source maps of external dependencies.

@coveralls
Copy link

coveralls commented Aug 27, 2024

Coverage Status

coverage: 90.797%. remained the same
when pulling 4ad052e on fix-source-maps-in-umd-build
into 6f5a467 on master.

Copy link
Member

@pomek pomek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't say that UMD CKEditor 5 build works when preparing using changes from this PR:

 at get parent (ckeditor5.js:5:175789)
    at Wh._validate (ckeditor5.js:5:266719)
    at Ju.<anonymous> (ckeditor5.js:5:350416)
    at Ju.fire (ckeditor5.js:5:6572)
    at <computed> [as applyOperation] (ckeditor5.js:5:38783)
    at Pu.insert (ckeditor5.js:5:328486)
    at Object.callback (main.js:51:11)
    at Ju._runPendingChanges (ckeditor5.js:5:355920)
    at Ju.change (ckeditor5.js:5:352975)
    at main.js:48:16

So, it's the same as I reported via a private channel.

@pomek
Copy link
Member

pomek commented Aug 28, 2024

PS: We miss an issue that we could use as a reference to explain the problem. The proposed commit message does not explain the reason for the change.

@filipsobol
Copy link
Member Author

I added two UMD builds to trigger the ckeditor-duplicated-modules error.

Before changes:

Uncaught CKEditorError: ckeditor-duplicated-modules
Read more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-ckeditor-duplicated-modules
    at ckeditor5.js:5:5295
    at ckeditor5.umd.js:4:77
    at ckeditor5.umd.js:5:3

After changes:

Uncaught CKEditorError: ckeditor-duplicated-modules
Read more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-ckeditor-duplicated-modules
    at version.ts:162:8        <-----------------------
    at ckeditor5.umd.js:4:77
    at ckeditor5.umd.js:5:3

@pomek
Copy link
Member

pomek commented Aug 28, 2024

After reinstalling dependencies it looks good:

position.ts:198 Uncaught CKEditorError: model-position-path-incorrect {"position":{"root":"main","path":[15,3],"stickiness":"toNone"}}
Read more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-model-position-path-incorrect
    at get parent (position.ts:198:11)
    at Wh._validate (insertoperation.ts:113:39)
    at Ju.<anonymous> (model.ts:96:14)
    at Ju.fire (emittermixin.ts:241:31)
    at <computed> [as applyOperation] (observablemixin.ts:281:17)
    at Pu.insert (writer.ts:241:14)
    at Object.callback (main.js:51:11)
    at Ju._runPendingChanges (model.ts:1109:59)
    at Ju.change (model.ts:234:17)
    at main.js:48:16

Copy link
Member

@pomek pomek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Copy link
Contributor

@pszczesniak pszczesniak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested - works as it should.

@filipsobol filipsobol merged commit defb966 into master Aug 28, 2024
6 checks passed
@filipsobol filipsobol deleted the fix-source-maps-in-umd-build branch August 28, 2024 07:57
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

Successfully merging this pull request may close these issues.

Broken source maps in the UMD build
4 participants