Browse Source

setupEnv : error on missing env file

Olivier Massot 1 year ago
parent
commit
de2d3c1994
1 changed files with 4 additions and 0 deletions
  1. 4 0
      nuxt.config.ts

+ 4 - 0
nuxt.config.ts

@@ -5,6 +5,10 @@ let https = {}
 
 let transpile = ['vuetify', '@vuepic/vue-datepicker', 'pinia', 'pinia-orm', 'date-fns']
 
+if (!process.env.NUXT_ENV) {
+    throw Error('Missing environment file - Run yarn install')
+}
+
 if (process.env.NUXT_ENV === 'dev') {
     https = {
         key: fs.readFileSync('env/local.app.opentalent.fr.key'),