ES6 Modules, Rollup, and Babel
See original GitHub issueThis is an issue for tracking the conversion of source to ES6 Modules along with a Rollup routine and Babel plug-in. In doing so, there are some methods mentioned in code that were to be moved between modules (e.g., some path
modules in svgcanvas
); these should be moved as well.
Additional ES6 refactoring could then be applied to source as well, such as ES6 classes.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:11 (9 by maintainers)
Top Results From Across the Web
How to Build and Publish ES6 Modules Today, with Babel and ...
From that “dist” folder you will publish your NPM library containing CommonJS, ES6 and UMD bundles compiled with Babel and Rollup. The “package.json”...
Read more >How to Bundle JavaScript With Rollup — Step-by-Step Tutorial
Rollup is a next-generation JavaScript module bundler. Author your app or library using ES2015 modules, then efficiently bundle them up into a single...
Read more >@rollup/plugin-babel - npm
Seamless integration between Rollup and Babel.. Latest version: 6.0.3, last published: a month ago. Start using @rollup/plugin-babel in your ...
Read more >rollup-plugin-babel - GitHub
If you're using Babel to transpile your ES6/7 code and Rollup to generate a standalone bundle, you have a couple of options: run...
Read more >rollup.js
Rollup is a module bundler for JavaScript which compiles small pieces of code into something larger and more complex, such as a library...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@brettz9 thanks, that solution works, however it would be nice if there was a named export to SVGCanvas in svgeditor.js (you are already importing it anyways 😉) so that we can at least use the package directly from the node modules without hardlinking to it (or copying it)
Something like: import { Canvas } from ‘svg-edit’
Currently it does not seem to be possible to import just the SVGCanvas from the library. It seems there is no export in svg-editor.js which is the main library in your package.json
I know that the component is most probably used as is, but currently I am working on a custom implementation and it would be nice if such an export was available