Search code examples
authenticationbasic-authenticationauth0svelte

What is the best way to add custom JS functions in a file into Svelte app?


What is the best way to add a JS file into Svelte app?

I will add custom javascript functions for authentication with Auth0 and I am trying to do the easiest way using Svelte architecture. Any suggestions?

I have done authentication with Netlify identity but I am now willing to do that with Auth0.


Solution

  • With import:

    <script>
       import thing from './your-thing.js';
    </script>