Skip to content
Discussion options

You must be logged in to vote

Got it working! External Scripts from remix-utils is the answer, I believe. In your app/root.jsx

import { Meta, Outlet, Scripts, ScrollRestoration } from '@remix-run/react'
import { ExternalScripts } from 'remix-utils/external-scripts'

export const handle = {
  scripts: () => [
    { src: 'https://unpkg.com/[email protected]/dist/ionicons/ionicons.js' }
  ]
}

export default function App () {
  return (
    <html lang='en'>
        <head></head>
       ...
        <body>
           <Outlet />
           ...
           <ExternalScripts />
         </body>
    </html>
  )
}

Then you can use <ion-icon /> normally in code.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by nikodunk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant