Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to pass esbuild options to the builder? #2912

Open
redmagic opened this issue Jul 12, 2021 · 1 comment
Open

Is it possible to pass esbuild options to the builder? #2912

redmagic opened this issue Jul 12, 2021 · 1 comment
Assignees
Labels
area: command: deploy area: functions type: feature code contributing to the implementation of a feature and/or user facing functionality

Comments

@redmagic
Copy link

I would like to pass options to the esbuild command.

For example, the ability to indicate that the text loader should be used for html files.

https://esbuild.github.io/api/#loader

Or the ability to mark modules as external e.g. fsevents

https://esbuild.github.io/api/#external

@redmagic redmagic added the type: feature code contributing to the implementation of a feature and/or user facing functionality label Jul 12, 2021
@erezrokah
Copy link
Contributor

Hi @redmagic, you can configure externals via netlify.toml, e.g.

[functions]
  external_node_modules = ["fsevents"]

See more here.

As for additional loaders you might want to comment on netlify/zip-it-and-ship-it#553.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: command: deploy area: functions type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

No branches or pull requests

4 participants