Webpack watch with salvattore.js doesn't work

Hello there,

I’m trying to use the salvattore.js script. It works perfectly fine when I’m doing yarn run build, but if I try to use it with yarn run start it doesn’t work.

After yarn install 'salvattore', this is how I import it:

import 'salvattore/dist/salvattore.min.js';

If I have a look into the main.js while yarn run start is running, I can find the salvattore code is in it. So I suggest, maybe it is not working, because it is not loaded early enough to do it’s magic?

Well hopefully there is an easy fix to it as it is not nice that I have to build everytime to test the theme. Thanks in advance :slight_smile:

Since Salvattore depends on the CSS for configuration, I wonder if it has to do with dist/styles not existing when yarn start is running. :thinking:

Yup, that would make sense. Any thoughts, if there could be a workaround/fix?

I tried manually applying this PR to see if it fixed anything, but had no success.