Draft: Import ViewComponent-specific Javascript with Webpack

What does this MR do and why?

This allows us to add JavaScript behavior to our ViewComponents. Still experimental.

Ideas how to extend this:

  • Add webpack entrypoint that only imports the view_component.js and use it in our Lookbook layout, so component JS (like alert dismiss) also work in Lookbook.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading