Replies: 1 comment 2 replies
-
Hi @alshdavid! This can easily be done by using the setting fetch.virtualServers. The property
import { Window } from "happy-dom";
const window = new Window({
settings: {
fetch: : {
virtualServers: [
{
url: 'https://localhost:8080/static/js/',
directory: "./build"
}
]
}
}
});
const module = await window.import('https://localhost:8080/static/js/script.js'; |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm doing local testing of my client application and don't want to set up an http server to host it. Is it possible to instruct dynamic JavaScript imports to fetch from the filesystem?
Beta Was this translation helpful? Give feedback.
All reactions