JS file is not linked to homepage

dannyelo
Excursionist
18 1 1

Hello,

I'm working on a custom theme, I create a main.js file and is linked in the theme.liquid file.

 

  <script src="{{ 'main.js' | asset_url }}" defer></script>

 

I have code in main.js to serve functionality to my product.liquid, and works.

I'm now trying to write some JavaScript code for the index.liquid and is not even console logging anything.

Any help here?

Thanks,

Replies 0 (0)