From 42eaf494bda89c5c9bd8f1bb566a705a791b2b2d Mon Sep 17 00:00:00 2001 From: David Manthey Date: Fri, 7 Jan 2022 09:17:12 -0500 Subject: [PATCH] fix: Build for older browsers. Otherwise, it is too hard to test in systems that still use PhantomJS. --- webpack.base.config.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/webpack.base.config.js b/webpack.base.config.js index b6ee8a5dff..95972662b6 100644 --- a/webpack.base.config.js +++ b/webpack.base.config.js @@ -40,6 +40,7 @@ module.exports = { mousetrap: 'mousetrap/mousetrap.js' } }, + target: ['web', 'es5'], plugins: [ define_plugin ], @@ -56,7 +57,14 @@ module.exports = { rules: [{ test: /\.js$/, include: path.resolve('src'), - use: ['babel-loader'] + use: [{ + loader: 'babel-loader', + options: { + presets: [['@babel/preset-env', { + targets: 'defaults, PhantomJS 2.1' + }]] + } + }] }, { test: /\.js$/, include: [