Skip to content

hyf0-agent/oxc-angular-abstract-repro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

oxc-angular-abstract-repro

Minimal reproduction attempt for voidzero-dev/oxc-angular-compiler#148.

Issue

The report claims that @oxc-angular/vite retains the TypeScript abstract keyword in compiled output, producing invalid JavaScript:

let BaseProvider = abstract class BaseProvider {
                            ^ Expected a semicolon

Setup

Exact versions from the issue:

  • @oxc-angular/vite: 0.0.17
  • Vite: 8.0.0 (also tested with rolldown-vite 7.3.1)
  • Angular: 20.x

Reproduce

npm install

# Test with Vite 8.0.0
npm run build

# Test with rolldown-vite 7.3.1
npx rolldown-vite build --config vite.config.rolldown.ts

Result

Both build successfully. The abstract keyword is correctly stripped by Vite/Rolldown's built-in TypeScript handling, which runs after the Angular plugin's order: 'pre' transform.

The Angular compiler's transformAngularFile API does output code that retains abstract (it's a partial transform — it handles Angular decorators, not full TS→JS). But this is by design: the Vite plugin runs at order: 'pre', so Vite/Rolldown's TS stripping processes the output afterward and removes abstract, type annotations, etc.

Verified output (no abstract in final JS):

var BaseProvider = class BaseProvider {
  greet() {
    return `Hello from ${this.name}`;
  }
  static ɵfac = ...
  static ɵprov = ...
};

Environment

  • OS: Linux x86_64 (Ubuntu)
  • Node.js: v22.22.0

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors