-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(nuxt): move to minimal nuxt config
- Loading branch information
1 parent
c850da2
commit bcc84d2
Showing
11 changed files
with
413 additions
and
1,361 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,111 +1,33 @@ | ||
import browserslistToEsbuild from 'browserslist-to-esbuild' | ||
|
||
// https://nuxt.com/docs/api/configuration/nuxt-config | ||
export default defineNuxtConfig({ | ||
devtools: { enabled: true }, | ||
modules: [ | ||
'@nuxtjs/tailwindcss', | ||
'@nuxt/fonts', | ||
'@nuxt/icon', | ||
'@nuxt/content', | ||
'@nuxt/image', | ||
], | ||
|
||
app: { | ||
head: { | ||
titleTemplate: '%s · Distrohop', | ||
// manually add lang until we use nuxt-i18n | ||
htmlAttrs: { lang: 'en' }, | ||
}, | ||
}, | ||
experimental: { | ||
asyncContext: true, | ||
headNext: true, | ||
componentIslands: true, | ||
}, | ||
|
||
// Modules | ||
modules: [ | ||
// Image Handling and Optimization | ||
'@nuxt/image', | ||
// Performance Optimization | ||
'@nuxtjs/critters', | ||
'nuxt-delay-hydration', | ||
// Content Management | ||
'@nuxt/content', | ||
// Utility Functions | ||
'@vueuse/nuxt', | ||
// Fonts and Typography | ||
'@nuxtjs/fontaine', | ||
'@nuxtjs/google-fonts', | ||
'@nuxtjs/tailwindcss', | ||
// SEO and Crawling | ||
'@nuxtjs/robots', | ||
// Icons | ||
'nuxt-icon', | ||
'nuxt-build-cache', | ||
], | ||
|
||
// Module Options | ||
content: { | ||
highlight: { theme: 'github-light' }, | ||
}, | ||
delayHydration: { | ||
debug: process.env.NODE_ENV === 'development', | ||
mode: 'mount', | ||
exclude: ['/quiz/**'], | ||
fonts: { | ||
families: [{ name: 'Artifika' }, { name: 'Archivo' }], | ||
}, | ||
|
||
// CSS and fonts | ||
postcss: { | ||
plugins: { | ||
'postcss-preset-env': true, | ||
cssnano: { | ||
preset: [ | ||
'default', | ||
{ | ||
discardComments: { removeAll: true }, | ||
}, | ||
], | ||
}, | ||
}, | ||
}, | ||
// NOTE: the actual tailwindcss config file is in the root of the project | ||
tailwindcss: { | ||
// exposeConfig lets us use tailwind completion in vscode | ||
exposeConfig: true, | ||
}, | ||
googleFonts: { | ||
download: true, | ||
families: { | ||
Artifika: true, | ||
Archivo: true, | ||
}, | ||
icon: { | ||
class: 'icon', | ||
}, | ||
|
||
// Build | ||
nitro: { | ||
compressPublicAssets: { brotli: true, gzip: true }, | ||
minify: true, | ||
future: { nativeSWR: true }, | ||
}, | ||
vite: { | ||
esbuild: { | ||
legalComments: 'none', | ||
target: browserslistToEsbuild(), | ||
}, | ||
}, | ||
routeRules: { | ||
'/': { swr: true }, | ||
'/quiz/**': { swr: true }, | ||
'/info/**': { static: true }, | ||
}, | ||
runtimeConfig: { | ||
databaseUrl: process.env.DATABASE_URL, | ||
turso: { | ||
authToken: process.env.TURSO_AUTH_TOKEN, | ||
}, | ||
}, | ||
|
||
// Development | ||
devtools: { enabled: true }, | ||
typescript: { | ||
strict: true, | ||
tsConfig: { | ||
compilerOptions: { | ||
types: ['@types/node'], | ||
}, | ||
}, | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,47 @@ | ||
{ | ||
"name": "nuxt-app", | ||
"private": true, | ||
"type": "module", | ||
"scripts": { | ||
"build": "nuxt build", | ||
"dev": "nuxt dev", | ||
"generate": "nuxt generate", | ||
"preview": "nuxt preview", | ||
"postinstall": "nuxt prepare", | ||
"db:migrate": "tsx migrate.ts", | ||
"db:seed": "tsx src/server/database/seed.ts", | ||
"db:generate": "drizzle-kit generate:sqlite --config ./drizzle.config.ts" | ||
}, | ||
"browserslist": ["last 4 versions, >0.2%, not dead"], | ||
"devDependencies": { | ||
"@biomejs/biome": "1.8.3", | ||
"@nuxt/devtools": "latest", | ||
"@tailwindcss/typography": "^0.5.13", | ||
"@types/better-sqlite3": "^7.6.10", | ||
"@types/lodash-es": "^4.17.12", | ||
"@types/node": "^20.14.9", | ||
"drizzle-kit": "^0.22.7", | ||
"lodash-es": "^4.17.21", | ||
"nuxt": "^3.12.2", | ||
"nuxt-build-cache": "^0.1.1", | ||
"prettier": "^3.3.2", | ||
"prettier-plugin-tailwindcss": "^0.6.5", | ||
"tailwindcss": "^3.4.4", | ||
"tsx": "^4.16.0", | ||
"type-fest": "^4.20.1", | ||
"vue": "^3.4.31", | ||
"vue-router": "^4.4.0", | ||
"vue-tsc": "^2.0.22" | ||
"postinstall": "nuxt prepare" | ||
}, | ||
"dependencies": { | ||
"@biomejs/biome": "^1.8.3", | ||
"@libsql/client": "^0.7.0", | ||
"@nuxt/content": "2.13.0", | ||
"@nuxt/content": "^2.13.0", | ||
"@nuxt/fonts": "^0.7.1", | ||
"@nuxt/icon": "^1.0.0", | ||
"@nuxt/image": "^1.7.0", | ||
"@nuxtjs/critters": "^0.7.1", | ||
"@nuxtjs/fontaine": "^0.4.3", | ||
"@nuxtjs/google-fonts": "^3.2.0", | ||
"@nuxtjs/robots": "^3.0.0", | ||
"@nuxtjs/tailwindcss": "^6.12.0", | ||
"@vueuse/core": "^10.11.0", | ||
"@vueuse/nuxt": "^10.11.0", | ||
"browserslist-to-esbuild": "^2.1.1", | ||
"@tailwindcss/typography": "^0.5.13", | ||
"drizzle-kit": "^0.22.8", | ||
"drizzle-orm": "^0.31.2", | ||
"nuxt-delay-hydration": "^1.3.3", | ||
"nuxt-icon": "^0.6.10", | ||
"postcss-preset-env": "^9.5.14", | ||
"valibot": "^0.35.0" | ||
"lodash-es": "^4.17.21", | ||
"nuxt": "^3.12.2", | ||
"tailwindcss": "^3.4.4", | ||
"type-fest": "^4.20.1", | ||
"valibot": "^0.35.0", | ||
"vue": "latest" | ||
}, | ||
"packageManager": "[email protected]" | ||
"packageManager": "[email protected]+sha512.f549b8a52c9d2b8536762f99c0722205efc5af913e77835dbccc3b0b0b2ca9e7dc8022b78062c17291c48e88749c70ce88eb5a74f1fa8c4bf5e18bb46c8bd83a", | ||
"devDependencies": { | ||
"@iconify-json/bi": "^1.1.23", | ||
"@iconify-json/carbon": "^1.1.36", | ||
"@iconify-json/clarity": "^1.1.13", | ||
"@iconify-json/codicon": "^1.1.49", | ||
"@iconify-json/eos-icons": "^1.1.10", | ||
"@iconify-json/fa6-solid": "^1.1.21", | ||
"@iconify-json/ic": "^1.1.17", | ||
"@iconify-json/logos": "^1.1.43", | ||
"@iconify-json/material-symbols": "^1.1.82", | ||
"@iconify-json/mdi": "^1.1.67", | ||
"@iconify-json/ri": "^1.1.21", | ||
"@iconify-json/simple-icons": "^1.1.107", | ||
"@iconify-json/solar": "^1.1.9", | ||
"@types/lodash-es": "^4.17.12" | ||
} | ||
} |
Oops, something went wrong.