Files
Niklas MischkulnigandGitHub b0780f2ae2 Turbopack: don't ignore TS parse errors (#84597)
`no_early_errors: true` was causing parse errors to be discarded.
For example with https://github.com/swc-project/swc/issues/11142 where there was a parse error (though it was a bug in this case), that left a `Invalid` AST node in the output, which only broke minification/SSG later on in the build (and potentially would have resulted in some error at runtime, if that specific chunk was never executed during SSG).
2025-10-07 23:11:45 +02:00
..

swc-ast-explorer

A small binary to print out SWC Abtract Syntax Trees.

echo "console.log('hello')" | cargo run -p swc-ast-explorer
Script(
  Script {
    body: [
      Expr(
        ExprStmt {
          expr: Call(
            CallExpr {
              callee: Expr(
                Member(
                  MemberExpr {
                    obj: Ident(
                      Ident {
                        sym: Atom('console' type=inline),
                        optional: false,
                      },
                    ),
                    prop: Ident(
                      Ident {
                        sym: Atom('log' type=inline),
                        optional: false,
                      },
                    ),
                  },
                ),
              ),
              args: [
                ExprOrSpread {
                  spread: None,
                  expr: Lit(
                    Str(
                      Str {
                        value: Atom('hello' type=inline),
                        raw: Some(
                          "'hello'",
                        ),
                      },
                    ),
                  ),
                },
              ],
              type_args: None,
            },
          ),
        },
      ),
    ],
    shebang: None,
  },
)