Fix build to not babel modules inside js/react sdk

Adds 'src' to react-sdk & js-sdk babel test path so we don't run node
modules inside js & react sdk through babel
pull/11949/head
David Baker 2020-01-20 18:00:38 +00:00
parent 4c699d8001
commit 5d8d5d70d0
1 changed files with 2 additions and 2 deletions

View File

@ -112,8 +112,8 @@ module.exports = (env, argv) => {
include: (f) => {
// we use the original source files of react-sdk and js-sdk, so we need to
// run them through babel.
if (f.startsWith(path.resolve(__dirname, 'node_modules', 'matrix-js-sdk'))) return true;
if (f.startsWith(path.resolve(__dirname, 'node_modules', 'matrix-react-sdk'))) return true;
if (f.startsWith(path.resolve(__dirname, 'node_modules', 'matrix-js-sdk', 'src'))) return true;
if (f.startsWith(path.resolve(__dirname, 'node_modules', 'matrix-react-sdk', 'src'))) return true;
// but we can't run all of our dependencies through babel (many of them still
// use module.exports which breaks if babel injects an 'include' for its
// polyfills: probably fixable but babeling all our dependencies is probably