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

This commit is contained in:
Joel Einbinder 2021-10-13 16:41:38 -04:00 committed by GitHub
parent 2a0a44bc09
commit 4d7b6b4b50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View File

@ -12,7 +12,6 @@
"@babel/plugin-transform-modules-commonjs"
],
"ignore": [
"**/*.d.ts",
"packages/playwright-core/src/injected/**/*"
"**/*.d.ts"
]
}

View File

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