Skip to content

Commit 3f2f37f

Browse files
authored
@uppy/svelte: fix generated module to not bundle Svelte (#5446)
1 parent b58c558 commit 3f2f37f

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

packages/@uppy/svelte/rollup.config.js

+8-9
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,17 @@ import resolve from '@rollup/plugin-node-resolve'
33
import preprocess from 'svelte-preprocess'
44
import svelteDts from 'rollup-plugin-svelte-types';
55

6-
const globals = {
7-
'@uppy/dashboard': 'Dashboard',
8-
'@uppy/drag-drop': 'DragDrop',
9-
'@uppy/progress-bar': 'ProgressBar',
10-
'@uppy/status-bar': 'StatusBar',
11-
}
12-
136
export default {
7+
external: [
8+
/^@uppy\//,
9+
/node_modules/,
10+
],
1411
input: 'src/index.ts',
1512
output: [
1613
{
1714
file: 'lib/index.js',
1815
format: 'es',
19-
globals,
16+
sourcemap: 'inline',
2017
},
2118
],
2219
plugins: [
@@ -25,7 +22,9 @@ export default {
2522
preprocess: preprocess(),
2623
}),
2724
resolve({
28-
resolveOnly: ['svelte'],
25+
browser: true,
26+
exportConditions: ['svelte'],
27+
extensions: ['.svelte']
2928
}),
3029
svelteDts.default({
3130
declarationDir: './lib/'

0 commit comments

Comments
 (0)