mirror of
https://github.com/denoland/deno.git
synced 2025-08-03 18:38:33 +00:00
fix(node): support re-exported esm modules in cjs export analysis (#28379)
Adds support for re-exporting an ES module from a CJS one and then importing the CJS module from ESM. Also fixes a bug where require esm wasn't working in deno compile.
This commit is contained in:
parent
0c0757fe66
commit
2292eb1c92
23 changed files with 366 additions and 166 deletions
|
@ -9,7 +9,6 @@ use deno_runtime::deno_permissions::PermissionsOptions;
|
|||
use deno_runtime::deno_telemetry::OtelConfig;
|
||||
use deno_semver::Version;
|
||||
use indexmap::IndexMap;
|
||||
use node_resolver::analyze::CjsAnalysisExports;
|
||||
use serde::Deserialize;
|
||||
use serde::Serialize;
|
||||
use url::Url;
|
||||
|
@ -130,7 +129,8 @@ impl<'a> DenoRtDeserializable<'a> for SpecifierId {
|
|||
#[derive(Deserialize, Serialize)]
|
||||
pub enum CjsExportAnalysisEntry {
|
||||
Esm,
|
||||
Cjs(CjsAnalysisExports),
|
||||
Cjs(Vec<String>),
|
||||
Error(String),
|
||||
}
|
||||
|
||||
const HAS_TRANSPILED_FLAG: u8 = 1 << 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue