-
Notifications
You must be signed in to change notification settings - Fork 49
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
Migrate to CodeMirror v6 #851
Comments
From what it looks like, CodeMirror v6 contains a complete architectural rewrite that heavily depends on bundlers, as each individual component has been separated into its own package (ex. JS language support, et. al.). The main I think Browserify is powerful enough to handle this, but we may want to research other options like Rollup or Vite as our dependency count scales up. |
@queengooborg Thank you! Are you aware of any pros/cons of staying with browserify vs moving to Rollup or Vite? |
Some pros I know of for Rollup and Webpack are much faster build times and ESM module support. Vite, I'm not quite as familiar with as I've only heard the name, but I've heard good things about it! |
If you tackle this, you can go with whatever of these three tools you prefer. I have also heard good things about Vite (almost instant builds?), we're currently using Webpack in yari, and Florian had a good impression of Rollup when experimenting with it in yari (not committed). 👍 |
## Background
So far, we have been bundling CodeMirror v5 ourselves by concatenating and minifiying several CodeMirror source files:
bob/lib/bundler.js
Lines 70 to 86 in 1669f37
We have been building to bundles:
codeMirror
(a.k.a.codemirror-5-50-2
):bob/bundles.json
Lines 4 to 13 in 1669f37
codeMirrorTabbed
(a.k.a.codemirror-tabbed-5-50-2
)bob/bundles.json
Lines 17 to 28 in 1669f37
Problem
In CodeMirror v6, this is no longer possible as
node_modules/codemirror
andnode_modules/@codemirror/*
no longer contain sources, but only adist/
folder with a single ESM (index.js
) and CommonJS (index.cjs
) entrypoint.The text was updated successfully, but these errors were encountered: