diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2019-05-23 17:03:04 +0200 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2019-10-29 12:56:00 +0100 |
commit | 515171a653d92c292070ef047c91fd724e0de45b (patch) | |
tree | 36fd8754b7f949d9929873cae449497823ef5d1e /babel.config.js | |
parent | fd90af50d910e659aa8df0d380424383c6c09620 (diff) | |
download | nextcloud-server-515171a653d92c292070ef047c91fd724e0de45b.tar.gz nextcloud-server-515171a653d92c292070ef047c91fd724e0de45b.zip |
Transpile also dependencies in node_modules
Some of the dependencies in node_modules, such as "p-queue", are not ES5
compatible, so they need to be transpiled to work in older browsers like
Internet Explorer 11.
Besides not excluding the dependencies for babel-loader in
"webpack.common.js" the global Babel configuration must be defined in
"babel.config.js", as in Babel 7.X, when ".babelrc.js" is used, all the
dependencies in "node_modules" are ignored (even if whitelisted in the
configuration file itself).
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'babel.config.js')
-rw-r--r-- | babel.config.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/babel.config.js b/babel.config.js new file mode 100644 index 00000000000..004c14b5119 --- /dev/null +++ b/babel.config.js @@ -0,0 +1,14 @@ +module.exports = { + plugins: [ + '@babel/plugin-syntax-dynamic-import', + ['@babel/plugin-proposal-class-properties', { loose: true }] + ], + presets: [ + [ + '@babel/preset-env', + { + modules: false + } + ] + ] +}; |