Răsfoiți Sursa

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.
Alasdair Smith 8 ani în urmă
părinte
comite
ec5b31663f
1 a modificat fișierele cu 3 adăugiri și 1 ștergeri
  1. 3 1
      services/web/webpack.config.js

+ 3 - 1
services/web/webpack.config.js

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