Scope webpack cache by version

06db0c15dbfd94e8f63f689488fb7532877ac139

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +3 -2Ignore whitespace
webpack.config.js+3 -2
@@ -1,6 +1,7 @@
11import process from 'node:process';
22import path from 'node:path';
33import isDocker from 'is-docker';
4+import webpack from 'webpack';
45import { serverDirectory } from './src/server-directory.js';
56
67/**
@@ -18,7 +19,7 @@ export default function getPublicLibConfig(forceDist = false) {
1819 }
1920
2021 if (typeof globalThis.DATA_ROOT === 'string') {
2122 return path.resolve(globalThis.DATA_ROOT, '_webpack', webpack.version, 'cache');
2223 }
2324
2425 throw new Error('DATA_ROOT variable is not set.');
@@ -30,7 +31,7 @@ export default function getPublicLibConfig(forceDist = false) {
3031 }
3132
3233 if (typeof globalThis.DATA_ROOT === 'string') {
3334 return path.resolve(globalThis.DATA_ROOT, '_webpack', webpack.version, 'output');
3435 }
3536
3637 throw new Error('DATA_ROOT variable is not set.');