swc-project/swc · error
module string names unimplemented
Error message
module string names unimplemented
What it means
Error "module string names unimplemented" thrown in swc-project/swc.
Source
Thrown at crates/swc_bundler/src/bundler/chunk/cjs.rs:284
}
.into_stmt()
.into();
return;
}
let mut props = Vec::new();
// TODO
for spec in i.specifiers.clone() {
match spec {
ImportSpecifier::Named(s) => match s.imported {
Some(ModuleExportName::Ident(imported)) => {
props.push(ObjectPatProp::KeyValue(KeyValuePatProp {
key: imported.into(),
value: Box::new(s.local.into()),
}));
}
Some(ModuleExportName::Str(..)) => {
unimplemented!("module string names unimplemented")
}
_ => {
props.push(ObjectPatProp::Assign(AssignPatProp {
span: s.span,
key: s.local.into(),
value: None,
}));
}
},
ImportSpecifier::Default(s) => {
props.push(ObjectPatProp::KeyValue(KeyValuePatProp {
key: PropName::Ident(IdentName::new(atom!("default"), DUMMY_SP)),
value: Box::new(s.local.into()),
}));
}
ImportSpecifier::Namespace(ns) => {
self.replaced = true;
*node = VarDecl {View on GitHub (pinned to d7d7434666)
When it happens
Trigger: Thrown at crates/swc_bundler/src/bundler/chunk/cjs.rs:284 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of swc-project/swc@d7d7434666 (2026-08-16).
Data as JSON: /api/errors/c81ae5407285a04b.
Report an issue: GitHub.