theme-scripts
theme-scripts copied to clipboard
Add Hot Module Replacement to section.js
Hot Module Replacement requires JS to formatted in a way that it can clean up after itself (reset any side-effects) without a full page refresh. section.js
is already formatted perfectly to handle situations like this, as they already happen within the theme editor.
Let's make section.js
compatible with Webpack Hot Module Replacement so that we can view JS changes without a page refresh.