Skip to content

Commit

Permalink
fix: simplify rollup config to support CodeSandbox
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinH committed Jan 5, 2022
1 parent 249ec86 commit e866f5d
Showing 1 changed file with 8 additions and 15 deletions.
23 changes: 8 additions & 15 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,11 @@ import svelte from 'rollup-plugin-svelte'
import resolve from '@rollup/plugin-node-resolve'
import pkg from './package.json'

const input = 'src/index.svelte'

export default [
{
input,
output: { file: pkg.main, format: 'umd', name: 'Cropper' },
plugins: [svelte(), resolve()],
},
{
input,
output: { file: pkg.module, format: 'es' },
external: ['svelte/internal'],
plugins: [svelte()],
},
]
export default {
input: 'src/index.svelte',
output: [
{ file: pkg.module, format: 'es' },
{ file: pkg.main, format: 'umd', name: 'Cropper' },
],
plugins: [svelte(), resolve()],
}

0 comments on commit e866f5d

Please sign in to comment.