Configure babel to not compile ES6 imports/exports

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.
This commit is contained in:
Alasdair Smith 2018-02-21 17:07:34 +00:00
parent 3677dc9a8b
commit ec5b31663f

View file

@ -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