FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat: add useDefineForClassFields playground fixture and pass tsconfig to Rolldown by Brooooooklyn · Pull Request #82 · voidzero-dev/oxc-angular-compiler · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .json  (2) .ts  (3) .yaml  (2) All 3 file types selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
9 changes: 7 additions & 2 deletions napi/angular-compiler/vite-plugin/index.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,13 @@ export function angular(options: PluginOptions = {}): Plugin[] {
include: ['rxjs/operators', 'rxjs'],
exclude: ['@angular/platform-server'],
},
// Note: We dynamically unwatch template/style files when discovered during transform
// using server.watcher.unwatch(). This is more precise than static glob patterns.
...(options.tsconfig && {
build: {
rolldownOptions: {
tsconfig: options.tsconfig,
},
},
}),
}
},
configResolved(config) {
Expand Down
4 changes: 3 additions & 1 deletion napi/playground/src/app/app.routes.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { Routes } from '@angular/router'

export const routes: Routes = []
import { CasesComponent } from './cases.component'

export const routes: Routes = [{ path: 'cases', component: CasesComponent }]
30 changes: 30 additions & 0 deletions napi/playground/src/app/cases.component.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { Component, Injectable, inject, signal } from '@angular/core'
import { Observable, of, delay } from 'rxjs'

@Injectable({ providedIn: 'root' })
export class CifaPanelService {
onClose: Observable<boolean> = of(true)
}

@Component({
selector: 'app-cases',
template: '<div>Cases: {{ view() }}</div>',
standalone: true,
})
export class CasesComponent {
// Field using inject()
private cifaPanelService = inject(CifaPanelService)

// Field referencing the inject() field above - CRASHES with native class fields
// because cifaPanelService may not be initialized yet
private casesDrawerCloseChangeEvent$ = this.cifaPanelService.onClose.pipe(delay(0))

// Private field with signal
#view = signal<string>('home')
view = this.#view.asReadonly()

constructor() {
this.casesDrawerCloseChangeEvent$.subscribe()
console.log('CasesComponent view:', this.#view())
}
}
23 changes: 23 additions & 0 deletions napi/playground/tsconfig.base.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"skipLibCheck": true,
"isolatedModules": true,
"experimentalDecorators": true,
"importHelpers": true,
"target": "ES2022",
"useDefineForClassFields": false,
"module": "preserve",
"moduleResolution": "bundler"
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": true
}
}
21 changes: 1 addition & 20 deletions napi/playground/tsconfig.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,24 +1,5 @@
{
"compilerOptions": {
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"skipLibCheck": true,
"isolatedModules": true,
"experimentalDecorators": true,
"importHelpers": true,
"target": "ES2022",
"module": "preserve",
"moduleResolution": "bundler"
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": true
},
"extends": "./tsconfig.base.json",
"references": [
{
"path": "../angular-compiler"
Expand Down
Loading
Loading

Back | FazBrowse Home | New Git URL