(options)
| 25 | }); |
| 26 | |
| 27 | function config(options) { |
| 28 | return { |
| 29 | ...options, |
| 30 | input: "src/index.js", |
| 31 | external: Object.keys(meta.dependencies || {}).filter(key => /^d3-/.test(key)), |
| 32 | output: { |
| 33 | ...options.output, |
| 34 | name: "d3", |
| 35 | indent: false, |
| 36 | extend: true, |
| 37 | banner, |
| 38 | globals: Object.assign({}, ...Object.keys(meta.dependencies || {}).filter(key => /^d3-/.test(key)).map(key => ({[key]: "d3"}))) |
| 39 | }, |
| 40 | plugins: [ |
| 41 | RollupNode(), |
| 42 | ...(options.plugins ?? []) |
| 43 | ] |
| 44 | }; |
| 45 | } |
| 46 | |
| 47 | export default [ |
| 48 | config({ |