diff options
author | RainLoop Team <support@rainloop.net> | 2018-09-18 23:35:41 +0300 |
---|---|---|
committer | RainLoop Team <support@rainloop.net> | 2018-09-18 23:35:41 +0300 |
commit | 26c507398f51bf5af1f3f86b3c89c6c2f24b92c5 (patch) | |
tree | 70676dcb33d8b38791bf64ecfab51a1b69d9b870 /webpack.config.builder.js | |
parent | 379d012b1f923426a1a30f4fca5aa6fd0ea1b9e1 (diff) |
babel 6 -> 7
Diffstat (limited to 'webpack.config.builder.js')
-rw-r--r-- | webpack.config.builder.js | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/webpack.config.builder.js b/webpack.config.builder.js index 610ba773b..4fe5f76e0 100644 --- a/webpack.config.builder.js +++ b/webpack.config.builder.js @@ -21,8 +21,11 @@ module.exports = function(publicPath, pro) { filename: '[name].js', publicPath: publicPath || 'rainloop/v/0.0.0/static/' }, + optimization: { + concatenateModules: false, + minimize: false + }, plugins: [ - // new webpack.optimize.ModuleConcatenationPlugin(), new webpack.DefinePlugin({ 'RL_COMMUNITY': !pro, 'process.env': { @@ -46,19 +49,29 @@ module.exports = function(publicPath, pro) { module: { rules: [ { - test: /\.js$/, + test: /\.(js|ts)$/, loader: 'babel-loader', include: [devPath], options: { cacheDirectory: true, - presets: [['env', { - loose: loose, - modules: false, - targets: { - browsers: ['last 3 versions', 'ie >= 9', 'firefox esr'] - } - }], 'stage-0'], - plugins: ['transform-runtime', 'transform-decorators-legacy'] + presets: [ + ['@babel/preset-env', { + loose: loose, + modules: false, + targets: { + browsers: ['last 3 versions', 'ie >= 9', 'firefox esr'] + } + }] + ], + plugins: [ + ['@babel/plugin-transform-runtime', { + corejs: 2 + }], + ['@babel/plugin-proposal-decorators', { + legacy: true + }], + '@babel/plugin-proposal-class-properties' + ] } }, { |