chore: fix racy emptyOutDir in trace-viewer build (#20090)

This commit is contained in:
Dmitry Gozman 2023-01-13 06:42:56 -08:00 committed by GitHub
parent e065d608b6
commit 3a1eb2abda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -35,7 +35,8 @@ export default defineConfig({
},
build: {
outDir: path.resolve(__dirname, '../playwright-core/lib/webpack/traceViewer'),
emptyOutDir: true,
// Output dir is shared with vite.sw.config.ts, clearing it here is racy.
emptyOutDir: false,
rollupOptions: {
output: {
entryFileNames: () => '[name].[hash].js',

View File

@ -35,6 +35,8 @@ export default defineConfig({
},
build: {
outDir: path.resolve(__dirname, '../playwright-core/lib/webpack/traceViewer'),
// Output dir is shared with vite.config.ts, clearing it here is racy.
emptyOutDir: false,
rollupOptions: {
input: {
sw: path.resolve(__dirname, 'src/sw.ts'),