Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-05-23 18:03:04 +0300
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2019-10-29 14:56:00 +0300
commit515171a653d92c292070ef047c91fd724e0de45b (patch)
tree36fd8754b7f949d9929873cae449497823ef5d1e /webpack.common.js
parentfd90af50d910e659aa8df0d380424383c6c09620 (diff)
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 'webpack.common.js')
-rw-r--r--webpack.common.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/webpack.common.js b/webpack.common.js
index 53c5d5e6769..4a8cf1d2a0f 100644
--- a/webpack.common.js
+++ b/webpack.common.js
@@ -81,7 +81,10 @@ module.exports = []
{
test: /\.js$/,
loader: 'babel-loader',
- exclude: /node_modules/
+ // automatically detect necessary packages to
+ // transpile in the node_modules folder
+ exclude: /node_modules(?!(\/|\\)(p-finally|p-limit|p-locate|p-queue|p-timeout|p-try)(\/|\\))/
+
},
{
test: /\.(png|jpg|gif)$/,