Webpack: Use cache version scoping in Docker
| @@ -15,7 +15,7 @@ import { serverDirectory } from './src/server-directory.js'; | |||
| 15 | export default function getPublicLibConfig(forceDist = false) { | 15 | export default function getPublicLibConfig(forceDist = false) { |
| 16 | function getCacheDirectory() { | 16 | function getCacheDirectory() { |
| 17 | if (forceDist || isDocker()) { | 17 | if (forceDist || isDocker()) { |
| 18 | return path.resolve(process.cwd(), 'dist/webpack'); | 18 | return path.resolve(process.cwd(), 'dist', '_webpack', webpack.version, 'cache'); |
| 19 | } | 19 | } |
| 20 | 20 | ||
| 21 | if (typeof globalThis.DATA_ROOT === 'string') { | 21 | if (typeof globalThis.DATA_ROOT === 'string') { |
| @@ -27,7 +27,7 @@ export default function getPublicLibConfig(forceDist = false) { | |||
| 27 | 27 | ||
| 28 | function getOutputDirectory() { | 28 | function getOutputDirectory() { |
| 29 | if (forceDist || isDocker()) { | 29 | if (forceDist || isDocker()) { |
| 30 | return path.resolve(process.cwd(), 'dist'); | 30 | return path.resolve(process.cwd(), 'dist', '_webpack', webpack.version, 'output'); |
| 31 | } | 31 | } |
| 32 | 32 | ||
| 33 | if (typeof globalThis.DATA_ROOT === 'string') { | 33 | if (typeof globalThis.DATA_ROOT === 'string') { |