-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Wrong] ESM module type does not support fields from common-js
#7963
Comments
|
#[serde(default)]
pub allow_top_level_this: bool,
#[serde(default)]
pub strict: bool,
#[serde(default = "default_strict_mode")]
pub strict_mode: bool,
#[serde(default)]
pub lazy: Lazy,
#[serde(default)]
pub import_interop: Option<ImportInterop>,
/// Emits `cjs-module-lexer` annotation
/// `cjs-module-lexer` is used in Node.js core for detecting the named
/// exports available when importing a CJS module into ESM.
/// swc will emit `cjs-module-lexer` detectable annotation with this option
/// enabled.
///
/// Defaults to `true` if import_interop is Node, else `false`
#[serde(default)]
pub export_interop_annotation: Option<bool>,
#[serde(default)]
/// Note: deprecated
pub no_interop: bool,
#[serde(default)]
pub ignore_dynamic: bool,
#[serde(default)]
pub preserve_import_meta: bool,
#[serde(default)]
pub resolve_fully: bool, |
strict
, expected resolveFully
common-js
Thank you @kdy1 🙏🏻 What exactly does |
I'm also getting this same error with version |
You don't need resolveFully |
Remove wrong fields. |
I don't have this field and it stills complaining about it. Here my .swcrc content and it works fine with
|
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Describe the bug
With
@swc/core
v1.3.85 I get the following error:If lower
@swc/core
version back to 1.3.84, the error goes away.Full stack:
Input code
Config
No response
Playground link
No response
SWC Info output
Expected behavior
No error.
Actual behavior
No response
Version
1.3.85
Additional context
The code is transpiled with the following stack:
webpack 5
->swc-loader
->swc/core
The text was updated successfully, but these errors were encountered: