Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

fix(build): don't compile our web files twice with babel (#9470)

Joel Einbinder4d7b6b4b50fa
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,
});
}