test: don't share cacheDir among different configs (#12625)

This commit is contained in:
翠 / green 2023-03-28 17:37:38 +09:00 committed by GitHub
parent e10c6bdc75
commit 8288ce6a50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 18 additions and 6 deletions

View File

@ -21,4 +21,5 @@ export default defineConfig({
testConfig: {
baseRoute: '/relative-base/',
},
cacheDir: 'node_modules/.vite-relative-base',
})

View File

@ -57,4 +57,5 @@ export default defineConfig({
}
},
},
cacheDir: 'node_modules/.vite-runtime-base',
})

View File

@ -21,4 +21,5 @@ export default defineConfig({
testConfig: {
baseRoute: '/url-base/',
},
cacheDir: 'node_modules/.vite-url-base',
})

View File

@ -9,4 +9,5 @@ export default defineConfig({
minify: true,
cssMinify: false,
},
cacheDir: 'node_modules/.vite-no-css-minify',
})

View File

@ -21,4 +21,5 @@ export default defineConfig({
testConfig: {
baseRoute: '/relative-base/',
},
cacheDir: 'node_modules/.vite-relative-base',
})

View File

@ -11,4 +11,5 @@ export default defineConfig({
},
outDir: 'dist/lib',
},
cacheDir: 'node_modules/.vite-dyimport',
})

View File

@ -9,4 +9,5 @@ export default defineConfig({
outDir: 'dist/nominify',
},
plugins: [],
cacheDir: 'node_modules/.vite-nominify',
})

View File

@ -23,4 +23,5 @@ export default defineConfig({
},
modulePreload: false,
},
cacheDir: 'node_modules/.vite-preload-disabled',
})

View File

@ -38,4 +38,5 @@ export default defineConfig({
return { relative: true }
},
},
cacheDir: 'node_modules/.vite-resolve-deps',
})

View File

@ -44,4 +44,5 @@ export default vite.defineConfig({
},
},
],
cacheDir: 'node_modules/.vite-es',
})

View File

@ -47,4 +47,5 @@ export default vite.defineConfig({
},
},
plugins: [workerPluginTestPlugin()],
cacheDir: 'node_modules/.vite-iife',
})

View File

@ -46,4 +46,5 @@ export default vite.defineConfig({
},
},
],
cacheDir: 'node_modules/.vite-relative-base',
})

View File

@ -12,10 +12,11 @@ export default (sourcemap) => {
sourcemap = true
}
const typeName =
typeof sourcemap === 'boolean' ? 'sourcemap' : 'sourcemap-' + sourcemap
return vite.defineConfig({
base: `/iife-${
typeof sourcemap === 'boolean' ? 'sourcemap' : 'sourcemap-' + sourcemap
}/`,
base: `/iife-${typeName}/`,
resolve: {
alias: {
'@': __dirname,
@ -33,9 +34,7 @@ export default (sourcemap) => {
},
},
build: {
outDir: `dist/iife-${
typeof sourcemap === 'boolean' ? 'sourcemap' : 'sourcemap-' + sourcemap
}/`,
outDir: `dist/iife-${typeName}/`,
sourcemap: sourcemap,
rollupOptions: {
output: {
@ -46,5 +45,6 @@ export default (sourcemap) => {
},
},
plugins: [workerPluginTestPlugin()],
cacheDir: `node_modules/.vite-sourcemap-${typeName}`,
})
}