UNPKG

978 BJavaScriptView Raw
1import babel from '@rollup/plugin-babel';
2import typescript from 'rollup-plugin-typescript2';
3
4export default {
5 input: './src/echo.ts',
6 output: [
7 { file: './dist/echo.js', format: 'esm' },
8 { file: './dist/echo.common.js', format: 'cjs' },
9 { file: './dist/echo.iife.js', format: 'iife', name: 'Echo' },
10 ],
11 plugins: [
12 typescript(),
13 babel({
14 babelHelpers: 'bundled',
15 exclude: 'node_modules/**',
16 extensions: ['.ts'],
17 presets: ['@babel/preset-env'],
18 plugins: [
19 ['@babel/plugin-proposal-decorators', { legacy: true }],
20 '@babel/plugin-proposal-function-sent',
21 '@babel/plugin-proposal-export-namespace-from',
22 '@babel/plugin-proposal-numeric-separator',
23 '@babel/plugin-proposal-throw-expressions',
24 '@babel/plugin-transform-object-assign',
25 ],
26 }),
27 ],
28};