Skip to content

Commit

Permalink
fix: Fix the build command for create-gensx.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoseley committed Jan 7, 2025
1 parent 66d6106 commit 1f1c134
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
7 changes: 5 additions & 2 deletions packages/create-gensx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@
"bin": {
"create-gensx": "./dist/cli.js"
},
"files": [
"dist"
],
"scripts": {
"build": "tsc",
"build": "vite build",
"clean": "rm -rf dist",
"dev": "tsc --watch",
"dev": "vite build --watch",
"test": "vitest"
},
"dependencies": {
Expand Down
8 changes: 5 additions & 3 deletions packages/create-gensx/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ export default defineConfig(({ command }) => ({
build: {
sourcemap: true,
lib: {
entry: resolve(__dirname, "src/index.ts"),
entry: {
index: resolve(__dirname, "src/index.ts"),
cli: resolve(__dirname, "src/cli.ts"),
},
formats: ["es"],
fileName: () => "index.js",
fileName: (_, entryName) => `${entryName}.js`,
},
rollupOptions: {
external: (id) => !id.startsWith(".") && !id.startsWith("/"),
Expand All @@ -18,7 +21,6 @@ export default defineConfig(({ command }) => ({
},
plugins: [
dts({
include: ["src"],
outDir: "dist",
rollupTypes: true,
}),
Expand Down

0 comments on commit 1f1c134

Please sign in to comment.