Skip to content

Commit deaa7d2

Browse files
authored
ft: skip Angular Runtime
1 parent 4f7e46f commit deaa7d2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/build-info/src/frameworks/angular.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { env } from 'node:process'
12
import { gte } from 'semver'
23

34
import { BaseFramework, Category, DetectedFramework, Framework } from './framework.js'
@@ -29,10 +30,13 @@ export class Angular extends BaseFramework implements Framework {
2930

3031
async detect(): Promise<DetectedFramework | undefined> {
3132
await super.detect()
32-
33+
const skipRuntime = env['NETLIFY_ANGULAR_RUNTIME_SKIP']
34+
3335
if (this.detected) {
3436
if (this.version && gte(this.version, '17.0.0-rc')) {
35-
this.plugins.push('@netlify/angular-runtime')
37+
if (skipRuntime !== '1' && skipRuntime !== 'true' {
38+
this.plugins.push('@netlify/angular-runtime')
39+
}
3640
const angularJson = await this.project.fs.gracefullyReadFile('angular.json')
3741
if (angularJson) {
3842
const { projects, defaultProject } = JSON.parse(angularJson)

0 commit comments

Comments
 (0)