2 years ago

#44661

test-img

niko

Vite + Vue3 + Fontawesome cauging syntax error

I migrated my vue3 project today from Webpack to Vite.

To make font awesome work I used the SVG plugin for vite and everything works correct in dev mode.

As soon as I want to build my project I get an syntax error

SyntaxError: Unexpected token 

Which is caused by the fontawesome-svg-core package in line 463 which is the following

if (!promise._handled && isNode) {
  global.process.emit('unhandledRejection', promise._data, promise);
}

This error makes no sense to me, anybody knows how to fix is or where I went wrong during my migration?

Thanks in advance

vue.js

font-awesome

vuejs3

vite

0 Answers

Your Answer

Accepted video resources