Skip to content

Commit

Permalink
Merge pull request #136 from xicri/chore-devtools-devdeps
Browse files Browse the repository at this point in the history
Only run `@nuxt/devtools` on local machine
  • Loading branch information
xicri authored Jan 11, 2024
2 parents 028aaf4 + eb9f01c commit 0e44ca3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import words from "./dataset/words.json";
import tags from "./dataset/tags.json";

const isLocal = !process.env.SERVER_ENV || process.env.SERVER_ENV === "local";

export default defineNuxtConfig({
ssr: true,
components: true,
Expand All @@ -22,7 +24,7 @@ export default defineNuxtConfig({
"@nuxtjs/i18n",
"@nuxtjs/sitemap",
"@pinia/nuxt",
"@nuxt/devtools",
...(isLocal ? [ "@nuxt/devtools" ] : []),
"nuxt-simple-robots",
],

Expand Down Expand Up @@ -78,7 +80,7 @@ export default defineNuxtConfig({
},

devtools: {
enabled: true,
enabled: isLocal,
},

// For nuxt-simple-robots and nuxt-simple-sitemap
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
"postinstall": "node ./scripts/postinstall.mjs && nuxt prepare && npm list @playwright/test && playwright install || echo 'Playwright installation skipped.'"
},
"dependencies": {
"@nuxt/devtools": "^1.0.6",
"@nuxtjs/i18n": "^8.0.0",
"@nuxtjs/sitemap": "^5.0.1",
"@pinia/nuxt": "^0.5.1",
Expand All @@ -45,6 +44,7 @@
},
"devDependencies": {
"@aws-sdk/client-s3": "^3.332.0",
"@nuxt/devtools": "^1.0.6",
"@playwright/test": "^1.14.1",
"concurrently": "^8.0.1",
"eslint": "latest",
Expand Down

0 comments on commit 0e44ca3

Please sign in to comment.