CntChen

Results 23 comments of CntChen

> 服务端全部加载,客户端按需 > -- @ibufu @jypblue 实例: ``` new webpack.DefinePlugin({ "process.env": { BROWSER: JSON.stringify(true), PACKFORSERVER: JSON.stringify(false) } }) ``` 使用: ``` componentWillMount() { console.log('componentWillMount'); if(process.env.BROWSER){ console.log('fetch when render in browser');...

I have meet the same issue. And I try to make a minimize demo to explain this issue. ## code ``` js // demo.js "use strict"; function add(aa, bb) {...

`--compress merge_vars=false` is useful to resolve this case. > merge_vars (default: true) — combine and reuse variables.