fix: disable parsing excel in web worker beacuse it breaks in the stream apps
This commit is contained in:
@@ -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
|
||||
*/
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user