Skip to content

Commit

Permalink
fix: transpile maplibre-gl on production only
Browse files Browse the repository at this point in the history
  • Loading branch information
wazolab committed Jan 11, 2024
1 parent 06619ba commit eb60d5a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ import { vidos } from './lib/config'
import { configuredApi, configuredImageProxy } from './utils/vido-config-static'

export default defineNuxtConfig({
env: {
// Copy NODE_ENV to know to real setting when use `nuxt build`
environment: process.env.NODE_ENV as string,
},

runtimeConfig: {
public: {
// @ts-ignore
Expand Down Expand Up @@ -132,7 +127,7 @@ export default defineNuxtConfig({
// Build Configuration (https://nuxt.com/docs/api/nuxt-config#build)
build: {
transpile: [
'maplibre-gl',
process.env.NODE_ENV === 'production' ? 'maplibre-gl' : '',
'iron-webcrypto',
'punycode',
'pinia',
Expand All @@ -153,6 +148,7 @@ export default defineNuxtConfig({
autoprefixer: {},
},
},

vite: {
optimizeDeps: { exclude: ['fsevents'] },
},
Expand Down

0 comments on commit eb60d5a

Please sign in to comment.