3 ms·
I see a lot of import statements in the examples like: import {EditorState, basicSetup} ...does this mean you need webpack or browserify or something in o
by umvi 6y ago
I see a lot of import statements in the examples like:
import {EditorState, basicSetup}
...does this mean you need webpack or browserify or something in order to use CM6?
- capableweb 6y agoNo, import/export statements are part of ES6 modules. If you're targeting modern browsers (https://caniuse.com/?search=es6%20modules https://caniuse.com/?search=es6%20modules) you can just use it straight up, no need for complicating things with webpack, browserify and/or et al.
- marijn 6y ago(Not really, at this point—the project, like most libraries with dependencies, uses non-relative imports, which browsers don't really handle yet at this point.)
- deleted 6y ago[deleted]
- okanesen 6y agoNo, not necessarily. There is a dedicated page under examples, if you're interested: https://codemirror.net/6/examples/bundle/ https://codemirror.net/6/examples/bundle/.