quickjs-ng / quickjs

QuickJS, the Next Generation: a mighty JavaScript engine
MIT License
698 stars 66 forks source link

Add `qjsc -n` parameter to override script name stored in bytecode #459

Closed TooTallNate closed 2 days ago

TooTallNate commented 2 days ago

I needed the ability to specify a different script name than the name of the input file (to add a URL prefix).

Nit: this kinda only makes sense for single JS file inputs, which is fine for my use case. But open to suggestions if a different approach would be preferred.