Build error with SvelteKit
petrper opened this issue · 1 comments
petrper commented
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.
petrper commented
Working solution #160 by KaspianDev
import { faFlag} from "@fortawesome/free-solid-svg-icons/faFlag";