mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
esm: add support for JSON import assertion
Remove V8 flag for import assertions, enabling support for the syntax; require the import assertion syntax for imports of JSON. Support import assertions in user loaders. Use both resolved module URL and import assertion type as the key for caching modules. Co-authored-by: Geoffrey Booth <webadmin@geoffreybooth.com> PR-URL: https://github.com/nodejs/node/pull/40250 Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
This commit is contained in:
committed by
Geoffrey Booth
parent
2e2a6fecd9
commit
2cc7a91a5d
@@ -28,6 +28,7 @@ int main(int argc, char* argv[]) {
|
||||
#endif // _WIN32
|
||||
|
||||
v8::V8::SetFlagsFromString("--random_seed=42");
|
||||
v8::V8::SetFlagsFromString("--harmony-import-assertions");
|
||||
|
||||
if (argc < 2) {
|
||||
std::cerr << "Usage: " << argv[0] << " <path/to/output.cc>\n";
|
||||
|
||||
Reference in New Issue
Block a user