Skip to content

Commit 7d52198

Browse files
authored
Merge pull request #43 from Nuxify/feature/dotenv
feat: add environment variables support
2 parents e5aa8f7 + c7a9013 commit 7d52198

File tree

4 files changed

+58
-23
lines changed

4 files changed

+58
-23
lines changed

.env.example

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
APP_NAME=
2+
APP_DESCRIPTION=
3+
APP_HOST=
4+
APP_PORT=
5+
APP_URL=
6+
API_URL=

nuxt.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
require('dotenv').config()
2+
13
const DEBUG = process.env.NODE_ENV !== 'production'
24

35
export default {
@@ -113,6 +115,7 @@ export default {
113115
'@nuxtjs/axios',
114116
'@nuxtjs/pwa',
115117
['vue-scrollto/nuxt', { duration: 1000 }],
118+
'@nuxtjs/dotenv',
116119
],
117120
/**
118121
* Public runtime configs

package-lock.json

+48-23
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"@mdi/js": "^5.9.55",
3030
"@nuxt/typescript-runtime": "^2.0.0",
3131
"@nuxtjs/axios": "^5.11.0",
32+
"@nuxtjs/dotenv": "^1.4.1",
3233
"@nuxtjs/pwa": "^3.0.0-0",
3334
"@types/jest": "^26.0.15",
3435
"babel-core": "^7.0.0-bridge.0",

0 commit comments

Comments
 (0)