Browse Source

fix lodash transpilation bug on non-dev modes

Olivier Massot 1 year ago
parent
commit
c2e81fc686
1 changed files with 5 additions and 1 deletions
  1. 5 1
      nuxt.config.ts

+ 5 - 1
nuxt.config.ts

@@ -3,11 +3,15 @@ import vuetify from 'vite-plugin-vuetify'
 
 let https = {}
 
+let transpile = ['vuetify', '@vuepic/vue-datepicker', 'pinia', 'pinia-orm', 'date-fns']
+
 if (process.env.NUXT_ENV === 'dev') {
     https = {
         key: fs.readFileSync('env/local.app.opentalent.fr.key'),
         cert: fs.readFileSync('env/local.app.opentalent.fr.crt'),
     }
+
+    transpile.push('lodash')
 }
 
 /**
@@ -158,6 +162,6 @@ export default defineNuxtConfig({
         provider: 'none'
     },
     build: {
-        transpile: ['vuetify', '@vuepic/vue-datepicker', 'pinia', 'pinia-orm', 'date-fns'],
+        transpile: transpile,
     }
 })