Webpack 2 Tree Shaking Configuration
Grgur Grisogono
36512

In case you’re using lazy export like

```
if (process.env.NODE_ENV === ‘production’) {
 module.exports = require(‘./config.prod’);
} else {
 module.exports = require(‘./config.dev’);
}
```

Don’t forget to update them to load the default es6 module:

```
if (process.env.NODE_ENV === ‘production’) {
 module.exports = require(‘./config.prod’).default;
} else {
 module.exports = require(‘./config.dev’).default;
}
```

Show your support

Clapping shows how much you appreciated Romain Neutron’s story.