Spaces:
Paused
Paused
icebear0828 Claude Opus 4.6 commited on
Commit ·
b94b4e5
1
Parent(s): eaf0b8a
fix: chunk regex match underscore in main-XXXXX.js filename
Browse filesVite chunk hashes can contain underscores (e.g. main-Dl6lTb0_.js)
which the previous regex [A-Za-z0-9]+ did not match.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
scripts/extract-fingerprint.ts
CHANGED
|
@@ -410,7 +410,7 @@ async function main() {
|
|
| 410 |
let mainPath = join(buildDir, "main.js");
|
| 411 |
if (existsSync(buildDir)) {
|
| 412 |
const files = readdirSync(buildDir);
|
| 413 |
-
const chunk = files.find((f) => /^main-[A-Za-z0-
|
| 414 |
if (chunk) {
|
| 415 |
mainPath = join(buildDir, chunk);
|
| 416 |
console.log(`[extract] Found chunk: ${chunk}`);
|
|
|
|
| 410 |
let mainPath = join(buildDir, "main.js");
|
| 411 |
if (existsSync(buildDir)) {
|
| 412 |
const files = readdirSync(buildDir);
|
| 413 |
+
const chunk = files.find((f) => /^main-[A-Za-z0-9_-]+\.js$/.test(f));
|
| 414 |
if (chunk) {
|
| 415 |
mainPath = join(buildDir, chunk);
|
| 416 |
console.log(`[extract] Found chunk: ${chunk}`);
|