svelte-i18n/rollup.config.js

20 lines
465 B
JavaScript
Raw Normal View History

2019-06-19 15:41:57 +02:00
import resolve from 'rollup-plugin-node-resolve'
import commonjs from 'rollup-plugin-commonjs'
import { terser } from 'rollup-plugin-terser'
2019-06-12 05:04:34 +02:00
2019-06-19 15:41:57 +02:00
import pkg from './package.json'
2019-06-12 05:04:34 +02:00
2019-06-19 15:41:57 +02:00
const plugins = [resolve(), commonjs(), terser()]
2019-06-12 05:04:34 +02:00
export default [
2019-06-19 15:41:57 +02:00
{
input: 'src/index.js',
external: [...Object.keys(pkg.dependencies), 'svelte/store'],
2019-06-19 15:42:04 +02:00
output: [
2019-06-19 22:34:18 +02:00
{ file: pkg.module, format: 'es' },
2019-06-19 15:41:57 +02:00
{ file: pkg.main, format: 'cjs' },
2019-06-12 05:04:34 +02:00
],
2019-06-19 15:41:57 +02:00
plugins,
},
]