Hi Martin

process.env.NODE_ENV will be replaced with 'production' or 'development' in
most of the bundlers like webpack. So the minifier can shake the dead code
only for dev environment.
If you are using rollup. There is a plugin-replace[1] can do this job

[1] https://www.npmjs.com/package/@rollup/plugin-replace

On Sat, Feb 13, 2021 at 12:44 AM Martin Kuhn <martin.kuhn...@gmail.com>
wrote:

>
> When I use echarts with sveltejs (and rollup build) I got an error at
> runtime when I do not define process.env.NODE_ENV.
>
> The error occurs in echarts/lib/util/clazz.js.
>
> Is this really necessary?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@echarts.apache.org
> For additional commands, e-mail: dev-h...@echarts.apache.org
>
>

-- 
Yi Shen
Apache ECharts(incubating) PMC

Reply via email to