From 4d7b6b4b50face1ef66fbc5506942ad06f7c7a6c Mon Sep 17 00:00:00 2001 From: Joel Einbinder Date: Wed, 13 Oct 2021 16:41:38 -0400 Subject: [PATCH] fix(build): don't compile our web files twice with babel (#9470) --- babel.config.json | 3 +-- utils/build/build.js | 8 +++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/babel.config.json b/babel.config.json index db3716e3ae..cb1cad7f3a 100644 --- a/babel.config.json +++ b/babel.config.json @@ -12,7 +12,6 @@ "@babel/plugin-transform-modules-commonjs" ], "ignore": [ - "**/*.d.ts", - "packages/playwright-core/src/injected/**/*" + "**/*.d.ts" ] } diff --git a/utils/build/build.js b/utils/build/build.js index 7080135551..a6df15552e 100644 --- a/utils/build/build.js +++ b/utils/build/build.js @@ -143,7 +143,13 @@ for (const packageDir of packages) { continue; steps.push({ command: 'npx', - args: ['babel', ...(watchMode ? ['-w', '--source-maps'] : []), '--extensions', '.ts', '--out-dir', path.join(packageDir, 'lib'), path.join(packageDir, 'src')], + args: [ + 'babel', + ...(watchMode ? ['-w', '--source-maps'] : []), + '--extensions', '.ts', + '--out-dir', path.join(packageDir, 'lib'), + '--ignore', 'packages/playwright-core/src/server/injected/**/*,packages/playwright-core/src/web/**/*', + path.join(packageDir, 'src')], shell: true, }); }