I am trying to build svelte project with vite and I'm facing the issue, that when I import an external library into the project it throws the following error:
[ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".css"
I've found a solution for that problem by adding the following line to the vite.config.ts
:
{ ssr: { noExternal: **regexp here** }}
It worked indeed, but when I try to build the project with vite build
it fails with the following error:
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
What might be the problem?
Basically, I just don't know what goes wrong, because I've tried to build this project on my PC and it worked, buy when I try to build it on my laptop or using GH Actions it fails :(