3 ms·
A wrapper bundle is what I prefer right now, here is a wrapper bundle I made for CodeMirror 6. It just provides the needed exports from the library. It can also
by benatkin 4y ago
A wrapper bundle is what I prefer right now, here is a wrapper bundle I made for CodeMirror 6. It just provides the needed exports from the library. It can also be verified on the client side with UNPKG or jsDelivr. My client side build prints out the integrity attribute. I still need to write the npm bundling code so at the moment I am relying on UNPKG.
https://codeberg.org/macchiato/editor-lib-codemirror/src/branch/pages/app.js https://codeberg.org/macchiato/editor-lib-codemirror/src/bra...
The rollup output is nice. I don't have terser, though I may add it later. When I added a couple exports the diff was just the change in my code.
The library using it can include the integrity attribute and a can go here and run the build after checking the html and JavaScript file and check the output (codeberg.page is like GitHub pages in that it the repo contents controls what it serves): https://macchiato.codeberg.page/editor-lib-codemirror/ https://macchiato.codeberg.page/editor-lib-codemirror/