Closed emcfarlane closed 1 year ago
Just saw this example: https://github.com/doteric/funpack/blob/master/examples/mjs-extension/package.json 👍
Hey @emcfarlane, yes, exactly, you can override all the configuration options of esbuild using the funpack configuration. I would like to also add presets for specific setups, but no ETA's yet so you have to override the esbuild config.
You can also use the "type": "module"
from the package.json, here is an example: https://github.com/doteric/funpack/blob/master/examples/module-splitting/package.json#L12
This configuration will also pass the type
inside your package.json
to the package.json in the output/bundle. packageFieldsToCopy
is responsible for this to be exact.
Let me know if this answers your questions. If you have any other problems or ideas feel free to let me know.
Thanks!
Thanks for the project! 🙏 The
"type": "module"
isn't passed down to package.json on built functions. AWS lambda thinks the module is a commonJS module and fails to parse.Another option tried is editing the esbuild ext: