Skip to content

Commit

Permalink
chore: force npm run dev to always stub the build for dev
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarosabu committed Oct 10, 2024
1 parent aece279 commit d4ecf66
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"scripts": {
"build": "unbuild",
"build:stub": "unbuild --stub",
"dev": "node dist/index.mjs",
"dev": "pnpm run build:stub && STUB=true node dist/index.mjs",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"test": "vitest",
Expand Down
2 changes: 1 addition & 1 deletion src/program.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { resolve } from 'pathe'
import { __dirname, handleError } from './utils'

// Read package.json for metadata
const packageJsonPath = resolve(__dirname, process.env.VITEST ? '../../package.json' : '../../package.json')
const packageJsonPath = resolve(__dirname, process.env.VITEST || process.env.STUB ? '../../package.json' : '../package.json')
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'))

// Declare a variable to hold the singleton instance
Expand Down

0 comments on commit d4ecf66

Please sign in to comment.