refactor(rollup): use name from pkg for umd build

This commit is contained in:
moklick
2022-09-12 21:47:20 +02:00
parent 556a3b3ee3
commit 620bfc6f6b
+2 -2
View File
@@ -56,7 +56,7 @@ export const umdConfig = defineConfig({
file: pkg.main, file: pkg.main,
format: 'umd', format: 'umd',
exports: 'named', exports: 'named',
name: 'ReactFlow', name: pkg.rollup?.name || 'ReactFlow',
globals, globals,
}, },
onwarn, onwarn,
@@ -64,7 +64,7 @@ export const umdConfig = defineConfig({
peerDepsExternal(), peerDepsExternal(),
...defaultPlugins, ...defaultPlugins,
typescript({ typescript({
clean: true clean: true,
}), }),
replace({ replace({
preventAssignment: true, preventAssignment: true,