Static GitHub Issues

[2315] env after build

prev: Remove #__nuxt div
next: Module not found: Error: Can't resolve 'plugin0'

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

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c2020">#c2020</a>)</em></sub></div>