Skip to content
This repository was archived by the owner on Nov 10, 2023. It is now read-only.

Commit b4168a2

Browse files
Fix build
1 parent 6d8edc5 commit b4168a2

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

vite.build.config.ts

+7-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ import typescript from 'rollup-plugin-typescript2';
1111
import vue from '@vitejs/plugin-vue';
1212
import { viteStaticCopy } from 'vite-plugin-static-copy';
1313

14+
const scopedPackageName = pkg.name;
15+
const packageName = scopedPackageName.split('/')[1];
1416

1517
const banner = `/**
16-
* @name ${pkg.name}
18+
* @name ${scopedPackageName}
1719
* @version ${pkg.version}
1820
* @description ${pkg.description}
1921
* @author ${pkg.author}
@@ -24,14 +26,16 @@ const banner = `/**
2426
*/
2527
`;
2628

29+
30+
2731
export default defineConfig({
2832
publicDir: false,
2933
build: {
3034
lib: {
3135
entry: './src/plugin/index.ts',
32-
name: pkg.name,
36+
name: packageName,
3337
formats: ['es', 'cjs'],
34-
fileName: format => `${pkg.name}.${format}.js`,
38+
fileName: format => `${packageName}.${format}.js`,
3539
},
3640
rollupOptions: {
3741
input: {

0 commit comments

Comments
 (0)