So I want to do:
if (process.env.NODE_ENV === 'production') {
import StatsPlugin from 'webpack-stats-plugin';
}
But eslint says:
Parsing error: 'import' and 'export' may only appear at the top level
I'm using babel-eslint parser.
Does this imply I can't load modules conditionally?