Skip to content

Commit 6100600

Browse files
authored
Update glossary term for shadowing (#1971)
1 parent 46ec1cd commit 6100600

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

docs/glossary.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -217,15 +217,11 @@ Configuration registry
217217
218218
component shadowing
219219
shadowing
220-
Volto uses a technique called component shadowing to override an existing Volto component with our local custom version, without having to modify Volto's source code.
220+
Component or module shadowing allows you to override a component from an existing package in a clean and structured way, without directly modifying third-party code.
221+
This technique is particularly useful for customizing the behavior or appearance of specific components in Volto or any add-ons.
221222
222-
Volto's source components are located in the filepath stem of `omelette/src/components/`.
223-
Custom components that shadow Volto's source would be located in the filepath stem of `src/customizations/components/`.
224-
Shadow components would have the same filepath as Volto's source compenents, excluding the stem.
225-
Thus `omelette/src/components/theme/Header/Header.jsx` would be shadowed by `src/customizations/components/theme/Header/Header.jsx`.
226-
227-
Webpack provides an alias mechanism that allows component shadowing in Volto, where the path for a module can be aliased to another module.
228-
By using this mechanism of file overrides, or component shadowing, Volto enables customization, similar to `z3c.jbot.`
223+
This mechanism is powered by Webpack's [`resolve.alias`](https://webpack.js.org/configuration/resolve/#resolvealias), which maps a module path to an alternative file or folder.
224+
Webpack resolves the override at build time, replacing the original module with your custom implementation.
229225
230226
Razzle
231227
A tool that simplifies {term}`SPA` and {term}`SSR` configuration for React projects.

0 commit comments

Comments
 (0)