Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module Loading Support #40

Open
SahAssar opened this issue Sep 6, 2019 · 1 comment
Open

Module Loading Support #40

SahAssar opened this issue Sep 6, 2019 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@SahAssar
Copy link

SahAssar commented Sep 6, 2019

Hi,

Thank you so much for this wrapper!

I'm running into some problems when loading modules, all I get back is ReferenceError: could not load module when running for example the following:

use quick_js::{Context};

fn main() {
    let context = Context::new().unwrap();
    let value = context.eval_as::<String>("(async () => {const test = await import('./js/module.js'); return test();})();").unwrap();
    println!("{}", &value);
}

With this in module.js:

export default () => {
    return 'Not working?';
};

Am I missing something obvious or is this just not supported yet?

@theduke
Copy link
Owner

theduke commented Sep 8, 2019

Module loading is not supported yet.

I have some initial work on it, I should be able to get to it next week.
It won't be enabled by default though due to security concerns.

@theduke theduke changed the title ReferenceError: could not load module Module Loading Support Sep 21, 2019
@theduke theduke self-assigned this Sep 21, 2019
@theduke theduke added the enhancement New feature or request label Sep 21, 2019
@theduke theduke reopened this Nov 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants