1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#![deny(clippy::all)]
#![allow(clippy::needless_lifetimes)]
#![allow(clippy::vec_box)]
#![allow(clippy::mutable_key_type)]

use serde::{Deserialize, Serialize};
use swc_common::{Span, SyntaxContext};

pub use self::{amd::amd, common_js::common_js, system_js::system_js, umd::umd};

#[macro_use]
pub mod util;
pub mod amd;
pub mod common_js;
pub mod import_analysis;
pub(crate) mod module_decl_strip;
pub(crate) mod module_ref_rewriter;
pub mod path;
pub mod rewriter;
pub mod system_js;
mod top_level_this;
pub mod umd;

#[derive(Debug, Default, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct EsModuleConfig {
    #[serde(default)]
    pub resolve_fully: bool,
}

type SpanCtx = (Span, SyntaxContext);