Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

How to use a new JS in the project #713

Closed
azinazadi opened this issue Aug 25, 2018 · 2 comments
Closed

How to use a new JS in the project #713

azinazadi opened this issue Aug 25, 2018 · 2 comments

Comments

@azinazadi
Copy link

Problem

*I can not find any way to use SVG 4 Everybody in my theme.

Replication steps

I downloaded the js file and put it in the scripts folder, then tried to import it in the theme.js but it doesnt work as that is not a module.

Then I also tried to put the js file in the static folder and load it in the theme.liquid:
{{ 'svg4everybody.min.js' | asset_url | script_tag }}

which gives me the error:
ERROR in ./layout/theme.liquid Module not found: Error: Can't resolve './svg4everybody.min.js' in '/home/zinoo/Programming/2018/knothome/knot-home-template/src/layout' @ ./layout/theme.liquid @ . sync ^\.\/layout.*\.liquid$ @ ../node_modules/@shopify/slate-tools/tools/webpack/static-files-glob.js @ multi ../node_modules/@shopify/slate-tools/tools/webpack/hot-client.js ../node_modules/@shopify/slate-tools/tools/webpack/static-files-glob.js

Would be very gratefull for any kind of help.

@t-kelly
Copy link
Contributor

t-kelly commented Aug 27, 2018

Duplicate #409

@lock
Copy link

lock bot commented Oct 26, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants