You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import Shepherd from "shepherd.js/dist/shepherd.mjs"
const tour = new Shepherd.Tour({
defaultStepOptions: {
cancelIcon: {
enabled: true
},
classes: 'class-1 class-2',
scrollTo: { behavior: 'smooth', block: 'center' }
}
});
//........
Question are, what did I miss, and how it is supposed to work with this import: <script type="module" src="shepherd.js/dist/shepherd.mjs"></script> ?
I think a jsfiddle would be much more didactic than the current demo page.
The text was updated successfully, but these errors were encountered:
@Guilouf I'm sorry you are having issues! The way you import depends on your project. If you are using build tools or frameworks of some kind then import Shepherd from "shepherd.js/dist/shepherd.mjs" in the JS file should work.
If you are trying to just load an HTML file and not using any tooling, you will need to point the src to wherever the Shepherd files live.
@RobbieTheWagner Thanks for the answer, but using a framework or not i still need to use the import Shepherd from "shepherd.js/dist/shepherd.mjs" style, i just can't see in which context i would need to use the <script type="module" src="shepherd.js/dist/shepherd.mjs"></script> import style to load the lib.
I don't have any js framework installed in my website, I use just vanilla Js just like in your demo. I successfully installed and used your lib, but your demo website is mentioning the script include that didn't work, at least for me, and not the ESN import, as you can see:
In which context the <script type="module" src="shepherd.js/dist/shepherd.mjs"></script> import would be usefull for this lib ? I'm not sure this is how it's supposed to work.
I'm not a power user of js, for the least. But in the the "demo", Shepherd module is imported in a script tag:
index.html
When imported like this, there is an error in the demo script,
Shepherd is not defined
.For the example to work, i had to do differently:
index.html
demoScript.js
Question are, what did I miss, and how it is supposed to work with this import:
<script type="module" src="shepherd.js/dist/shepherd.mjs"></script>
?I think a jsfiddle would be much more didactic than the current demo page.
The text was updated successfully, but these errors were encountered: