Home

Issue: 2315

env after build

[issue link]

tell me what to do so that after the assembly the conditions for “process.env” not cut out

example:

nuxt.config.js

const CDN_HOST = process.env.CDN_HOST || 'http://127.0.0.1:10800';
const API_HOST = process.env.API_HOST || 'http://127.0.0.1:8080';

...
env: {
    API_HOST,
    CDN_HOST,
    PANEL: 'client'
  },
...

after the assembly “API_HOST” and “CDN_HOST” is cut from the code, and I need them to remain, both for the client side and server side

This question is available on Nuxt.js community (#c2020)