Skip to content

Commit 973b144

Browse files
authored
fix: docs build error (#507)
* fix: docs build error * feat: override angular cli browserslist
1 parent c415aa0 commit 973b144

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

.browserslistrc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
> 0.5%
2+
last 2 versions
3+
Firefox ESR
4+
not dead
5+
not IE 9-11

src/environments/environment.prod.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import { version } from '../../projects/swimlane/ngx-graph/package.json';
1+
// eslint-disable-next-line
2+
const packageVersion = require('../../projects/swimlane/ngx-graph/package.json').version;
23

34
export const environment = {
45
production: true,
5-
version
6+
version: packageVersion
67
};

src/environments/environment.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
import packageInfo from '../../projects/swimlane/ngx-graph/package.json';
1+
// eslint-disable-next-line
2+
const packageVersion = require('../../projects/swimlane/ngx-graph/package.json').version;
23

34
// This file can be replaced during build by using the `fileReplacements` array.
45
// `ng build ---prod` replaces `environment.ts` with `environment.prod.ts`.
56
// The list of file replacements can be found in `angular.json`.
67

78
export const environment = {
89
production: false,
9-
version: packageInfo.version
10+
version: packageVersion
1011
};
1112

1213
/*

tsconfig.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
"paths": {
1818
"@swimlane/ngx-graph": ["projects/swimlane/ngx-graph/src/public_api"],
1919
"@swimlane/ngx-graph/*": ["projects/swimlane/ngx-graph/src/*"]
20-
}
20+
},
21+
"types": ["node"]
2122
},
2223
"angularCompilerOptions": {
2324
"fullTemplateTypeCheck": true

0 commit comments

Comments
 (0)