fix: failing on nuviotv due to es2016
This commit is contained in:
1 parent
27a87191c3
commit
c7eb7b83a9
6 files changed
+390
-469
No files matched your search
@@ -65,7 +65,9 @@ async function buildProvider(providerName, options = {}) {
|
||||
outfile: outFile,
|
||||
format: 'cjs', // CommonJS for module.exports compatibility
|
||||
platform: 'neutral', // Works in both browser and node-like environments
|
||||
target: 'es2016', // Transpile async/await to generators for Hermes
|
||||
// Both Nuvio runtimes support native async/await. Keeping it avoids
|
||||
// esbuild's generator helper, which older NuvioTV builds can reject.
|
||||
target: 'es2017',
|
||||
minify: options.minify || false, // Minify if --minify flag is set
|
||||
sourcemap: false,
|
||||
external: EXTERNAL_MODULES,
|
||||
@@ -107,7 +109,8 @@ async function transpileSingleFile(filename) {
|
||||
try {
|
||||
const result = await esbuild.transform(originalContent, {
|
||||
loader: 'js',
|
||||
target: 'es2016', // Transpile async/await to generators
|
||||
// Match bundled providers and retain native async/await for both apps.
|
||||
target: 'es2017',
|
||||
format: 'cjs'
|
||||
});
|
||||
|
||||
@@ -190,4 +193,3 @@ main().catch(err => {
|
||||
console.error('Build failed:', err);
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user