Skip to content

Commit

Permalink
fix(create-mini-app): add shebang
Browse files Browse the repository at this point in the history
  • Loading branch information
heyqbnk committed Mar 27, 2024
1 parent ab61396 commit ccdd9eb
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/create-mini-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"@types/node": "^20.0.0",
"build-utils": "workspace:*",
"eslint-config-custom": "workspace:*",
"rollup-plugin-preserve-shebang": "^1.0.1",
"test-utils": "workspace:*",
"tsconfig": "workspace:*"
},
Expand Down
1 change: 1 addition & 0 deletions packages/create-mini-app/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env node
import process from 'node:process';

import chalk from 'chalk';
Expand Down
6 changes: 6 additions & 0 deletions packages/create-mini-app/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import { defineConfig } from 'vite';
import shebang from 'rollup-plugin-preserve-shebang';

export default defineConfig({
plugins: [
shebang({
shebang: '#!/usr/bin/env node',
}),
],
build: {
emptyOutDir: true,
ssr: true,
Expand Down
22 changes: 21 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ccdd9eb

Please sign in to comment.