Playing around using rollup to bundle things for copy/paste into cuttle.xyz.
npm install
rollup -c
copy/paste bundle.js
| import { Delaunay, Voronoi } from 'd3-delaunay'; | |
| export { Delaunay, Voronoi }; |
| { | |
| "dependencies": { | |
| "d3-delaunay": "^6.0.2" | |
| }, | |
| "devDependencies": { | |
| "@rollup/plugin-node-resolve": "^13.0.4" | |
| } | |
| } |
| import resolve from '@rollup/plugin-node-resolve'; | |
| export default { | |
| input: 'main.js', | |
| output: { | |
| file: 'bundle.js', | |
| format: 'iife', | |
| name: 'ext' | |
| }, | |
| plugins: [ resolve() ] | |
| }; |