Third party libraries not working with local path when previewed

How do I include a third party library like moment.js or fabric.js into gDevelop?

There are plenty of examples with this working without a problem, as long as the library is loaded through the internet via unpkg or any other cdn service.

What is the expected result

That i can use the library when i preview my game.

What is the actual result

I have put the moment.js library inside a JS folder that i created within the game root folder. I then created a JS event adding the script into the header of the HTML once the stage has begun.
When i use a web-URL as location, it works.
When i link the src to the local folder, it does not work, because it can not find the JS file inside the preview folder of Windows.
I would say that the JS file is not copied into the preview folder, though i have added the JS file inside the resources manager of gDevelop.

const script = document.createElement('script');
script.src = 'https://cdn.jsdelivr.net/npm/fabric@latest/dist/index.min.js';
//script.src = './js/fabric.min.js';
document.head.appendChild(script);

The uncommented first script.src works.
When i use the second script.src then the preview can not find the file.