Hi Yi,

yeah, but a more developer friendly behavior would be good. 
Currently you get an error, where you have to figure out yourself what the 
reason is.

I would suggest to check if the variable is defined and when not to assume a 
save value and log out that the lib expects the var…

Also, it should be documented (I had no luck to find this in the doc).


Regards 
Martin

On 2021/02/17 02:20:57, Yi Shen <s...@gmail.com> wrote: 
> 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 <ma...@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