snek

Results 463 comments of snek

after all is said and done we should be able to load json and native add-ons with import too. the process of migration is always going to be tough.

everything here seems to be working as intended. its just weird and complex because two separate module systems with separate caches are being welded together.

@ljharb its a new esm module, but it hits the existing require cache.

when ?q=2 runs, it puts a new entry into require.cache. ?q=3 hits that cache entry.

@ljharb query strings are always preserved in esm, and always normalized out in cjs. In this case, each ?q=x is a new esm module, but that new esm module may...

q=0, q=1, q=2, q=3 are all distinct es modules. "re-evaluating" in this case refers to whether the cjs module they wrap reruns.

simplified example: https://engine262.js.org/#gist=31db83a9a28067300fccedc80b9e7725

you have to create wrappers for anything that isn't a module. the vm.SyntheticModule class can help you with that.

@SMotaal sometime after esm is stable.

I think the current exposed hooks are the right hooks to expose, but we definitely need to work on polishing the API: - dynamic modules are a bit rough atm...