-
Notifications
You must be signed in to change notification settings - Fork 10
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
Modes cannot be imported in bundler #25
Comments
The issue I have with this approach is I'd like to maintain the ability to update codemirror by bumping the dep and running a simple command to copy the source files over. It would require re-running this modification after each update. What I'd much much rather do is implicitly import any dependencies necessary using Ex, if mode=javascript is selected then it should automatically add a script tag to the HTML header if one doesn't already exist there @therealadityashankar already has a way to handle this that guarantees there will be no dupes. We could even modify the API to introduce a new The real question is... Does webpack support for import.meta.url actually work? |
I have the same problem with esbuild, any solution? |
I want to use wc-codemirror with webpack and it's not possible to import a mode
This fails because the original source tries to
require('../../lib/codemirror')
.While I would not like to modify all those mode modules, I propose to create dummy commonjs (sic!) module at that path so that webpack and possibly other bundler can import do their thing
It can be simply
Ugly but it works
The text was updated successfully, but these errors were encountered: