Skip to content

Commit

Permalink
upgrade deps, nuxt 4 ready, change nuxt structure
Browse files Browse the repository at this point in the history
  • Loading branch information
k2so-dev committed Jul 8, 2024
1 parent 7b216ae commit 7e7194d
Show file tree
Hide file tree
Showing 37 changed files with 24 additions and 36 deletions.
20 changes: 13 additions & 7 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
srcDir: 'nuxt/',
compatibilityDate: '2024-07-03',
rootDir: 'nuxt/',

future: {
compatibilityVersion: 4,
},

/**
* Manually disable nuxt telemetry.
Expand All @@ -21,7 +26,8 @@ export default defineNuxtConfig({

app: {
head: {
title: 'Laravel/Nuxt Boilerplate',
title: 'Home',
titleTemplate: '%s | LaravelNuxt Boilerplate',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
Expand Down Expand Up @@ -57,10 +63,10 @@ export default defineNuxtConfig({

image: {
domains: [
import.meta.env.API_URL || 'http://127.0.0.1:8000'
import.meta.env.APP_URL || 'http://127.0.0.1:8000'
],
alias: {
api: import.meta.env.API_URL || 'http://127.0.0.1:8000'
api: import.meta.env.APP_URL || 'http://127.0.0.1:8000'
}
},

Expand All @@ -69,7 +75,7 @@ export default defineNuxtConfig({
crossOriginEmbedderPolicy: 'unsafe-none',
crossOriginOpenerPolicy: 'same-origin-allow-popups',
contentSecurityPolicy: {
"img-src": ["'self'", "data:", "https://*", import.meta.env.API_URL || 'http://127.0.0.1:8000'],
"img-src": ["'self'", "data:", "https://*", import.meta.env.APP_URL || 'http://127.0.0.1:8000'],
},
},
},
Expand All @@ -91,9 +97,9 @@ export default defineNuxtConfig({
runtimeConfig: {
apiLocal: import.meta.env.API_LOCAL_URL,
public: {
apiBase: import.meta.env.API_URL,
apiBase: import.meta.env.APP_URL,
apiPrefix: '/api/v1',
storageBase: import.meta.env.API_URL + '/storage/',
storageBase: import.meta.env.APP_URL + '/storage/',
providers: {
google: {
name: "Google",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 0 additions & 3 deletions nuxt/server/tsconfig.json

This file was deleted.

19 changes: 9 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,27 @@
"private": true,
"type": "module",
"scripts": {
"serve": "cross-env PORT=3000 HOST=127.0.0.1 node .output/server/index.mjs",
"serve": "node nuxt/.output/server/index.mjs",
"build": "nuxi cleanup && nuxi build",
"cleanup": "nuxi cleanup",
"dev": "nuxt dev --port=3000 --host=127.0.0.1",
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare",
"api": "php artisan octane:start --watch --port=8000 --host=127.0.0.1"
"api": "php artisan octane:start --watch"
},
"devDependencies": {
"@iconify-json/heroicons": "^1.1.20",
"@iconify-json/heroicons": "^1.1.21",
"@iconify/vue": "^4.1.2",
"@nuxt/devtools": "^1.3.1",
"@nuxt/devtools": "^1.3.9",
"@nuxt/image": "^1.7.0",
"@nuxt/ui": "^2.16.0",
"@nuxt/ui": "^2.17.0",
"@pinia/nuxt": "^0.5.1",
"chokidar": "^3.6.0",
"cross-env": "^7.0.3",
"dayjs-nuxt": "^2.1.9",
"nuxt": "^3.11.2",
"nuxt": "^3.12.3",
"nuxt-security": "^1.4.3",
"vue": "^3.4.27",
"vue-router": "^4.3.2"
"vue": "^3.4.31",
"vue-router": "^4.4.0"
}
}
18 changes: 2 additions & 16 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,7 @@
{
// https://nuxt.com/docs/guide/concepts/typescript
"extends": "./.nuxt/tsconfig.json",
"exclude": [
"./app",
"./bootstrap",
"./config",
"./database",
"./public",
"./resources",
"./routes",
"./storage",
"./tests",
"./vendor"
],
"extends": "./nuxt/.nuxt/tsconfig.json",
"compilerOptions": {
"types": [
"vite/client"
]
"module": "ESNext"
}
}

0 comments on commit 7e7194d

Please sign in to comment.