Webpack can automatically handle the transpilation of ES6 imports to ES5. It can also better optimize transpilation as raw ES6 imports can be tree-shaken better.
@@ -45,7 +45,9 @@ module.exports = {
use: [{
loader: 'babel-loader',
options: {
- presets: ['env'],
+ presets: [
+ ['env', { modules: false }]
+ ],
// Configure babel-loader to cache compiled output so that subsequent
// compile runs are much faster
cacheDirectory: true