Button with URLs and Imports. #364
Unanswered
orangesidny
asked this question in
Q&A
Replies: 1 comment 1 reply
-
If you're trying to import the I'm not sure what you mean by your second question. Do you mean to remove all JavaScript from the website Primo generates? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there, I am trying to have a button that will be clicked and go to a URL /info eg localhost:4000/[slug]/info
But as its a dynamic slug I can not use a href that points to /info,
But Instead, I am trying to add some javascript import { page } from "$app/stores"; but the error Error: Unexpected token (Note that you need plugins to import files that are not JavaScript) happens but I am not sure what to do after that.
I have read the docs but that is for javascript modules, this is a svelte import.
I do have a second question, I am wondering if there is a way in the builder or loader to remove all javascript and then add default javascript to each module.
For example, this button to move to the /info url needs javascript, but I want to eventually remove the javascript functionality due to some security concerns.
Beta Was this translation helpful? Give feedback.
All reactions