Cweili / svelte-fa

Tiny FontAwesome component for Svelte

Home Page:https://cweili.github.io/svelte-fa/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build error with SvelteKit

petrper opened this issue · comments

Building my SvelteKit project ends with the following error:

SyntaxError: Named export 'faFlag' not found. The requested module '@fortawesome/free-solid-svg-icons' is a CommonJS module, which may not support all module.exports as named exports.

In dev the project works. It seems the problem started since SvelteKit use Vite 3.

Thanks for help.

Working solution #160 by KaspianDev

import { faFlag} from "@fortawesome/free-solid-svg-icons/faFlag";