Skip to content

Add build.edge_handlers configuration property #1828

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

Merged
merged 1 commit into from
Sep 21, 2020

Conversation

ehmicky
Copy link
Contributor

@ehmicky ehmicky commented Sep 18, 2020

Part of #1821

This PR adds a build.edge_handlers configuration property.

[build]
edge_handlers = "src/my-edge-handlers"

This property behaves exactly like functions when it comes to file path resolution, validation, etc.

@ehmicky ehmicky self-assigned this Sep 18, 2020
@ehmicky ehmicky requested a review from erezrokah September 18, 2020 19:39
@ehmicky ehmicky added project:edge-handlers-support type: feature code contributing to the implementation of a feature and/or user facing functionality labels Sep 18, 2020
@@ -6,14 +6,24 @@ const { removeEmptyObject, removeEmptyArray } = require('./remove')

// Make sure we are not printing secret values. Use an allow list.
const cleanupConfig = function({
build: { base, command, commandOrigin, environment = {}, functions, ignore, processing, publish } = {},
build: { base, command, commandOrigin, environment = {}, functions, edge_handlers, ignore, processing, publish } = {},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated to this PR, but should we open an issue to change commandOrigin to command_origin?
Also, can we also return edge_handlers_output_dir (or something similar) to be used by the CLI?
Context netlify/cli#1244 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For command_origin: #1834

For edge_handlers_output_dir, neither @netlify/config nor @netlify/build knows nor uses that constant. This is defined and used internally by the Edge handlers plugin at the moment. When it comes to making that plugin share the constant to Netlify CLI, I think this should be tracked in #1822 (comment).

@ehmicky ehmicky merged commit 0bcd23f into master Sep 21, 2020
@ehmicky ehmicky deleted the feat/edge_handlers_config branch September 21, 2020 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
project:edge-handlers-support type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants