Skip to content

Commit 2f7ecfb

Browse files
committed
fix: valaxy types export
1 parent 0148632 commit 2f7ecfb

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

packages/valaxy/bin/valaxy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// const path = require('path')
55

66
function main() {
7-
const { run } = require('../dist/cli')
7+
const { run } = require('../dist/node/cli')
88
run()
99
}
1010

packages/valaxy/src/node/cli.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ import { version } from '../../package.json'
1212
import { resolveOptions } from './options'
1313
import { bindShortcut, initServer, printInfo } from './utils/cli'
1414

15+
// build
16+
import { build, ssgBuild } from './build'
17+
1518
const cli = yargs.scriptName('valaxy')
1619
.usage('$0 [args]')
1720
.version(version)
@@ -137,7 +140,6 @@ cli.command(
137140
}
138141

139142
if (ssg) {
140-
const { ssgBuild } = await import('./build')
141143
consola.info('use vite-ssg to do ssg build...')
142144

143145
try {
@@ -149,8 +151,6 @@ cli.command(
149151
}
150152
}
151153
else {
152-
const { build } = await import('./build')
153-
154154
consola.info('use vite do spa build...')
155155
await build(options, viteConfig)
156156
}

packages/valaxy/tsup.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export default defineConfig((options) => {
55
entry: [
66
'src/node/index.ts',
77
'src/node/cli.ts',
8+
'src/index.ts',
89
],
910
// https://tsup.egoist.sh/#code-splitting
1011
// Code splitting currently only works with the esm output format, and it's enabled by default. If you want code splitting for cjs output format as well, try using --splitting flag which is an experimental feature to get rid of the limitation in esbuild.

0 commit comments

Comments
 (0)