({ input, external })
| 71 | } |
| 72 | |
| 73 | function cjs({ input, external }) { |
| 74 | return { |
| 75 | // CJS |
| 76 | external, |
| 77 | input, |
| 78 | output: { |
| 79 | format: 'cjs', |
| 80 | sourcemap: true, |
| 81 | dir: `build/lib`, |
| 82 | preserveModules: true, |
| 83 | exports: 'named', |
| 84 | entryFileNames: '[name].js', |
| 85 | }, |
| 86 | plugins: [babelPlugin, commonJS(), nodeResolve({ extensions })], |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | function umdDev({ input, external, globals, jsName }) { |
| 91 | return { |