Loads a file and returns its content as JavaScript code. If the file is a TypeScript file, it will be bundled using esbuild.
The path to the file to load.
Optional
Optional esbuild build options to customize the bundling process.
An object containing the JavaScript code as a string.
Will throw an error if the file cannot be read or bundled.
Loads a file and returns its content as JavaScript code. If the file is a TypeScript file, it will be bundled using esbuild.