@netlify/config 18.2.1 → 18.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/context.js +10 -1
package/package.json
CHANGED
package/src/context.js
CHANGED
|
@@ -87,9 +87,18 @@ const isEdgeFunctionsConfig = function (key, value) {
|
|
|
87
87
|
// Takes into account that `context.{context}.build.*` is the same as
|
|
88
88
|
// `context.{context}.*`
|
|
89
89
|
export const ensureConfigPriority = function ({ build = {}, ...config }, context, branch) {
|
|
90
|
-
|
|
90
|
+
const base = {
|
|
91
91
|
...config,
|
|
92
92
|
build,
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// remove the redirects to not have context specific redirects.
|
|
96
|
+
// The redirects should be only on the root level.
|
|
97
|
+
// eslint-disable-next-line fp/no-delete, no-param-reassign
|
|
98
|
+
delete config.redirects
|
|
99
|
+
|
|
100
|
+
return {
|
|
101
|
+
...base,
|
|
93
102
|
context: {
|
|
94
103
|
...config.context,
|
|
95
104
|
[context]: { ...config, ...build, build },
|