Skip to content

update codemirror to latest version #353

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

Merged
merged 3 commits into from
Jan 7, 2023
Merged

update codemirror to latest version #353

merged 3 commits into from
Jan 7, 2023

Conversation

karlicoss
Copy link
Owner

No description provided.

ugh. tried everything, but seems that async imports work the best for proper chunk splitting
- handles dependencies correctly, only options page code is remaining in options_page.js
- force naming chunks is nice cause they end up with random numeric names in optimized build
- still don't understand how it works without including codemirror.js into the html page

also tried
- static import + splitting chunks like this
     cacheGroups: {
       codemirror: {
         test: /[\\/]node_modules[\\/].*codemirror/,
         name: 'codemirror',
         chunks: 'all',
       },
     },
  this works, but doesn't split out dependencies of codemirror?
  so still end up with some crap in options_page.js

- specifying codemirror entry point and adding to dependsOn
     'codemirror': {
       // TODO no need for codemirror source map??
       import: [
         "codemirror",
         "@codemirror/view",
         "@codemirror/language",
         "@codemirror/search",
         "@codemirror/autocomplete",
         "@codemirror/state",
         "@codemirror/lang-css",
         "@codemirror/lang-javascript",
       ],
     }
   this splits out everything properly... but then options page failed loading another chunk, webext-options-sync
   no idea why, couldn't figure out
@karlicoss karlicoss merged commit da7374b into master Jan 7, 2023
@karlicoss karlicoss deleted the codemirror-6 branch January 7, 2023 18:28
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.

1 participant