From f1d3a170430501b4fab1a2d2abb5d77528251c77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 5 Oct 2021 01:35:55 +0200 Subject: feat: add --compat flag to provide built-in Node modules (#12293) This commit adds "--compat" flag. When the flag is passed a set of mappings for built-in Node modules is injected into the import map. If user doesn't explicitly provide an import map (using "--import-map" flag) then a map is created on the fly. If there are already existing mappings in import map that would clash with built-in Node modules a set of diagnostics is printed to the terminal with suggestions how to proceed. --- cli/tools/standalone.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'cli/tools/standalone.rs') diff --git a/cli/tools/standalone.rs b/cli/tools/standalone.rs index 33bc7881e..fb07254aa 100644 --- a/cli/tools/standalone.rs +++ b/cli/tools/standalone.rs @@ -227,6 +227,7 @@ pub fn compile_to_runtime_flags( lock: None, log_level: flags.log_level, no_check: false, + compat: flags.compat, unsafely_ignore_certificate_errors: flags .unsafely_ignore_certificate_errors, no_remote: false, -- cgit v1.2.3