Skip to content

Commit

Permalink
Patch nuxt/cli#193 Add close hook to nuxt.config.ts and update build …
Browse files Browse the repository at this point in the history
…script in package.json
  • Loading branch information
crearis committed Jan 24, 2024
1 parent fd7993b commit f4a77bc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion apps/tp-template/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@ export default defineNuxtConfig({
extends: [
'@crearis/theme-main'
],
hooks: {
close: (nuxt) => {
if (!nuxt.options._prepare) {
process.exit()
}
},
},
nitro: {
prerender: {
routes: ['/'],
ignore: [
'/product/',
'/category',
Expand Down
3 changes: 2 additions & 1 deletion apps/tp-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@
"private": true,
"main": "./nuxt.config.ts",
"scripts": {
"build": "nuxi build",
"build": "nuxi build --log-level=verbose",
"dev": "pruvious dev",
"dev:old": "nuxi dev -p 3000",
"generate": "nuxi generate",
"lint": "nuxt typecheck && eslint --ext .vue,.js,.ts .",
"lint:fix": "eslint --ext .vue,.js,.ts . --fix",
"preview": "nuxi preview",
"postinstall": "nuxi prepare",
"test": "vitest run",
"test:coverage": "vitest run --coverage",
"test:watch": "vitest",
Expand Down

0 comments on commit f4a77bc

Please sign in to comment.