fix: disable parsing excel in web worker beacuse it breaks in the stream apps
All checks were successful
Build / Build-and-ng-test (pull_request) Successful in 3m41s
Build / Build-and-test-development (pull_request) Successful in 9m41s
Lighthouse Checks / lighthouse (24.5.0) (pull_request) Successful in 18m0s

This commit is contained in:
M
2026-02-10 11:58:00 +01:00
parent 46cdeb0bab
commit 280bdeeb1b

View File

@@ -511,6 +511,21 @@ export class SpreadsheetUtil {
return resolve(XLSX.read(data, opts))
}
// TEMPORARILY DISABLED: Web Worker for XLSX parsing
// Worker is disabled because Angular/webpack bundles it as a separate chunk
// with a numeric filename (e.g., 411.hash.js). In SAS9/Viya streaming
// environments, all JS files need to be served through SASJobExecution
// with _program= parameter, but our post-build processor can't reliably
// find and replace the worker chunk reference in the minified output.
// FIX: Add "namedChunks": true to production config in angular.json
// (under projects.datacontroller.architect.build.configurations.production)
// This will output worker as "spreadsheet-worker.hash.js" instead of
// numeric ID, making it findable by post-processor.
// Trade-off: UI may briefly freeze when parsing large Excel files.
return resolve(XLSX.read(data, opts))
/*
if (typeof Worker === 'undefined') {
console.info(
'Not using worker to parse the XLSX - no Worker available in this environment'
@@ -551,6 +566,7 @@ export class SpreadsheetUtil {
setTimeout(() => {
return resolve(XLSX.read(data, opts))
}, 600 * 1000) // 10 minutes
*/
})
}