Overrides/shadowing in Volto

Is this a valid assumption in Volto?
src/customizations/@@eeacms/volto-metadata-block/components/manage/Blocks/Metadata/View.jsx
would override/shadow:
node_modules/@eeacms/volto-metadata-block/src/components/manage/Blocks/Metadata/View.jsx

I figure if the shadowing is working, then adding:
console.log("hello"); to the shadow would result in "hello" being printed on the console.

I saw nothing.
So I tried adding it to the original View.jsx file and then "hello" was printed on the console.
So there seems to be something wrong or different in how I'm doing the shadowing here.

:dotted_line_face: After staring at this for a few minutes, I found the problem:
I had an extra @ sign in my path.
The original path has only one @ sign.

image

1 Like

@pigeonflight you can also use the shadowing debug feature:

DEBUG=shadowing yarn start

It will show the current shadows that do not match with original modules.

5 Likes