Skip to content

Commit

Permalink
@uppy/svelte: fix generated module to not bundle Svelte (#5446)
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 authored Sep 3, 2024
1 parent b58c558 commit 3f2f37f
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions packages/@uppy/svelte/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,17 @@ import resolve from '@rollup/plugin-node-resolve'
import preprocess from 'svelte-preprocess'
import svelteDts from 'rollup-plugin-svelte-types';

const globals = {
'@uppy/dashboard': 'Dashboard',
'@uppy/drag-drop': 'DragDrop',
'@uppy/progress-bar': 'ProgressBar',
'@uppy/status-bar': 'StatusBar',
}

export default {
external: [
/^@uppy\//,
/node_modules/,
],
input: 'src/index.ts',
output: [
{
file: 'lib/index.js',
format: 'es',
globals,
sourcemap: 'inline',
},
],
plugins: [
Expand All @@ -25,7 +22,9 @@ export default {
preprocess: preprocess(),
}),
resolve({
resolveOnly: ['svelte'],
browser: true,
exportConditions: ['svelte'],
extensions: ['.svelte']
}),
svelteDts.default({
declarationDir: './lib/'
Expand Down

0 comments on commit 3f2f37f

Please sign in to comment.