| 1 | import commonjs from '@rollup/plugin-commonjs' |
| 2 | import replace from '@rollup/plugin-replace' |
| 3 | import resolve from '@rollup/plugin-node-resolve' |
| 4 | import babel from '@rollup/plugin-babel' |
| 5 | |
| 6 | export default function (config) { |
| 7 | return { |
| 8 | input: 'src/turndown.js', |
| 9 | output: config.output, |
| 10 | external: ['@mixmark-io/domino'], |
| 11 | plugins: [ |
| 12 | commonjs(), |
| 13 | replace({ 'process.browser': JSON.stringify(!!config.browser), preventAssignment: true }), |
| 14 | resolve(), |
| 15 | babel({ |
| 16 | babelHelpers: 'bundled', |
| 17 | plugins: [ |
| 18 | '@babel/plugin-transform-block-scoping', |
| 19 | '@babel/plugin-transform-shorthand-properties' |
| 20 | ] |
| 21 | }) |
| 22 | ] |
| 23 | } |
| 24 | } |