-
import('../develop/develop.module').then(m => m.DevelopModule),
canDeactivate: [PreviousRouteRecorder],
data: {
hasSidebar: false,
@@ -23,7 +23,7 @@ import {MonitorComponent} from "./monitor.component";
},
{
path: ':stakeholder/methodology',
- loadChildren: '../methodology/methodology.module#MethodologyModule',
+ loadChildren: () => import('../methodology/methodology.module').then(m => m.MethodologyModule),
canDeactivate: [PreviousRouteRecorder],
data: {
hasSidebar: false,
@@ -32,7 +32,7 @@ import {MonitorComponent} from "./monitor.component";
},
{
path: ':stakeholder/search',
- loadChildren: '../search/search.module#SearchModule',
+ loadChildren: () => import('../search/search.module').then(m => m.SearchModule),
canDeactivate: [PreviousRouteRecorder]
},
{
diff --git a/src/app/search/search.module.ts b/src/app/search/search.module.ts
index e1ab3b0..bdbebc2 100644
--- a/src/app/search/search.module.ts
+++ b/src/app/search/search.module.ts
@@ -5,24 +5,24 @@ import {RouterModule} from "@angular/router";
imports: [CommonModule, RouterModule.forChild([
// Search Pages
{ path: '', redirectTo: 'find/research-outcomes'},
- { path: 'find/research-outcomes', loadChildren: './searchPages/simple/searchResearchResults.module#MonitorSearchResearchResultsModule'},
- { path: 'find/projects', loadChildren: './searchPages/simple/searchProjects.module#MonitorSearchProjectsModule'},
- { path: 'find/dataproviders', loadChildren: './searchPages/simple/searchDataProviders.module#MonitorSearchDataProvidersModule'},
- { path: 'find/organizations', loadChildren: './searchPages/simple/searchOrganizations.module#MonitorSearchOrganizationsModule'},
+ { path: 'find/research-outcomes', loadChildren: () => import('./searchPages/simple/searchResearchResults.module').then(m => m.MonitorSearchResearchResultsModule)},
+ { path: 'find/projects', loadChildren: () => import('./searchPages/simple/searchProjects.module').then(m => m.MonitorSearchProjectsModule)},
+ { path: 'find/dataproviders', loadChildren: () => import('./searchPages/simple/searchDataProviders.module').then(m => m.MonitorSearchDataProvidersModule)},
+ { path: 'find/organizations', loadChildren: () => import('./searchPages/simple/searchOrganizations.module').then(m => m.MonitorSearchOrganizationsModule)},
// Advanced Search Pages
- { path: 'advanced/research-outcomes', loadChildren: './searchPages/advanced/searchResearchResults.module#MonitorAdvancedSearchResearchResultsModule'},
- { path: 'advanced/projects', loadChildren: './searchPages/advanced/searchProjects.module#MonitorAdvancedSearchProjectsModule'},
- { path: 'advanced/dataproviders', loadChildren: './searchPages/advanced/searchDataProviders.module#MonitorAdvancedSearchDataProvidersModule'},
- { path: 'advanced/organizations', loadChildren: './searchPages/advanced/searchOrganizations.module#MonitorAdvancedSearchOrganizationsModule'},
+ { path: 'advanced/research-outcomes', loadChildren: () => import('./searchPages/advanced/searchResearchResults.module').then(m => m.MonitorAdvancedSearchResearchResultsModule)},
+ { path: 'advanced/projects', loadChildren: () => import('./searchPages/advanced/searchProjects.module').then(m => m.MonitorAdvancedSearchProjectsModule)},
+ { path: 'advanced/dataproviders', loadChildren: () => import('./searchPages/advanced/searchDataProviders.module').then(m => m.MonitorAdvancedSearchDataProvidersModule)},
+ { path: 'advanced/organizations', loadChildren: () => import('./searchPages/advanced/searchOrganizations.module').then(m => m.MonitorAdvancedSearchOrganizationsModule)},
// Landing Pages
- { path: 'result', loadChildren: './landingPages/result/libResult.module#LibResultModule'},
- { path: 'publication', loadChildren: './landingPages/publication/libPublication.module#LibPublicationModule'},
- { path: 'dataset', loadChildren: './landingPages/dataset/libDataset.module#LibDatasetModule'},
- { path: 'software', loadChildren: './landingPages/software/libSoftware.module#LibSoftwareModule'},
- { path: 'other', loadChildren: './landingPages/orp/libOrp.module#LibOrpModule'},
- { path: 'project', loadChildren: './landingPages/project/libProject.module#LibProjectModule'},
- { path: 'dataprovider', loadChildren: './landingPages/dataProvider/libDataProvider.module#LibDataProviderModule'},
- { path: 'organization', loadChildren: './landingPages/organization/libOrganization.module#LibOrganizationModule'},
+ { path: 'result', loadChildren: () => import('./landingPages/result/libResult.module').then(m => m.LibResultModule)},
+ { path: 'publication', loadChildren: () => import('./landingPages/publication/libPublication.module').then(m => m.LibPublicationModule)},
+ { path: 'dataset', loadChildren: () => import('./landingPages/dataset/libDataset.module').then(m => m.LibDatasetModule)},
+ { path: 'software', loadChildren: () => import('./landingPages/software/libSoftware.module').then(m => m.LibSoftwareModule)},
+ { path: 'other', loadChildren: () => import('./landingPages/orp/libOrp.module').then(m => m.LibOrpModule)},
+ { path: 'project', loadChildren: () => import('./landingPages/project/libProject.module').then(m => m.LibProjectModule)},
+ { path: 'dataprovider', loadChildren: () => import('./landingPages/dataProvider/libDataProvider.module').then(m => m.LibDataProviderModule)},
+ { path: 'organization', loadChildren: () => import('./landingPages/organization/libOrganization.module').then(m => m.LibOrganizationModule)},
])]
})
export class SearchModule {}
diff --git a/src/app/topic/indicators.component.ts b/src/app/topic/indicators.component.ts
index e960d7c..f12acee 100644
--- a/src/app/topic/indicators.component.ts
+++ b/src/app/topic/indicators.component.ts
@@ -83,14 +83,14 @@ export class IndicatorsComponent implements OnInit, OnDestroy, OnChanges, AfterV
public numberResults: Map = new Map();
private subscriptions: any[] = [];
private urlSubscriptions: any[] = [];
- @ViewChild('editChartModal') editChartModal: AlertModal;
- @ViewChild('editNumberModal') editNumberModal: AlertModal;
- @ViewChild('deleteModal') deleteModal: AlertModal;
+ @ViewChild('editChartModal', { static: true }) editChartModal: AlertModal;
+ @ViewChild('editNumberModal', { static: true }) editNumberModal: AlertModal;
+ @ViewChild('deleteModal', { static: true }) deleteModal: AlertModal;
//@ViewChild('deleteAllModal') deleteAllModal: AlertModal;
//@ViewChild('deleteAndDisconnectModal') deleteAndDisconnectModal: AlertModal;
//@ViewChild('deleteChartSectionModal') deleteChartSectionModal: AlertModal;
//@ViewChild('deleteNumberSectionModal') deleteNumberSectionModal: AlertModal;
- @ViewChild('deleteSectionModal') deleteSectionModal: AlertModal;
+ @ViewChild('deleteSectionModal', { static: true }) deleteSectionModal: AlertModal;
public sectionTypeToDelete: string;
public sectionChildrenActionOnDelete: string;
public indicatorChildrenActionOnDelete: string;
@@ -99,9 +99,9 @@ export class IndicatorsComponent implements OnInit, OnDestroy, OnChanges, AfterV
urlParameterizedMessage = null;
showCheckForSchemaEnhancements:boolean = false;
private notification: Notification;
- @ViewChild('editNumberNotify') editNumberNotify: NotifyFormComponent;
- @ViewChild('editChartNotify') editChartNotify: NotifyFormComponent;
- @ViewChild('deleteNotify') deleteNotify: NotifyFormComponent;
+ @ViewChild('editNumberNotify', { static: true }) editNumberNotify: NotifyFormComponent;
+ @ViewChild('editChartNotify', { static: true }) editChartNotify: NotifyFormComponent;
+ @ViewChild('deleteNotify', { static: true }) deleteNotify: NotifyFormComponent;
constructor(private layoutService: LayoutService,
private stakeholderService: StakeholderService,
private statisticsService: StatisticsService,
diff --git a/src/app/topic/topic.component.ts b/src/app/topic/topic.component.ts
index bec616d..f146822 100644
--- a/src/app/topic/topic.component.ts
+++ b/src/app/topic/topic.component.ts
@@ -59,8 +59,8 @@ export class TopicComponent implements OnInit, OnDestroy, IDeactivateComponent {
*/
public toggle: boolean = false;
- @ViewChild('deleteModal') deleteModal: AlertModal;
- @ViewChild('editModal') editModal: AlertModal;
+ @ViewChild('deleteModal', { static: true }) deleteModal: AlertModal;
+ @ViewChild('editModal', { static: true }) editModal: AlertModal;
public elementChildrenActionOnDelete: string;
public filters: FormGroup;
public all: Option = {
diff --git a/src/app/utils/adminDashboard.guard.ts b/src/app/utils/adminDashboard.guard.ts
index 19d993d..c440582 100644
--- a/src/app/utils/adminDashboard.guard.ts
+++ b/src/app/utils/adminDashboard.guard.ts
@@ -7,14 +7,12 @@ import {
RouterStateSnapshot,
UrlTree
} from '@angular/router';
-import {Observable} from 'rxjs/Observable';
-
import {map, take, tap} from "rxjs/operators";
import {UserManagementService} from "../openaireLibrary/services/user-management.service";
import {LoginErrorCodes} from "../openaireLibrary/login/utils/guardHelper.class";
import {Session} from "../openaireLibrary/login/utils/helper.class";
import {StakeholderService} from "../openaireLibrary/monitor/services/stakeholder.service";
-import {zip} from "rxjs";
+import {Observable, zip} from "rxjs";
@Injectable()
@@ -45,7 +43,7 @@ export class AdminDashboardGuard implements CanActivate, CanActivateChild {
}
}
- canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable | boolean {
+ canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable | Promise | boolean | UrlTree {
return this.check(state.url, route.params.stakeholder);
}
diff --git a/src/assets/new.css b/src/assets/new.css
index 0cd0fce..ffbd369 100644
--- a/src/assets/new.css
+++ b/src/assets/new.css
@@ -16,7 +16,7 @@
}
.stakeholderPage #page_content {
- background-image: url("/assets/monitor-shapes-bg.svg");
+ background-image: url("~src/assets/monitor-shapes-bg.svg");
background-size: contain;
background-repeat: no-repeat;
background-position: bottom;
@@ -70,12 +70,12 @@
/*}*/
/*Sidebar Header logo */
#sidebar_main .sidebar_main_header .portal-logo {
- background: url("/assets/common-assets/logo-large-monitor.png") no-repeat;
+ background: url("~src/assets/common-assets/logo-large-monitor.png") no-repeat;
background-size: contain;
}
.sidebar_mini #sidebar_main .sidebar_main_header .portal-logo {
- background: url("/assets/common-assets/logo-small-monitor.png") no-repeat;
+ background: url("~src/assets/common-assets/logo-small-monitor.png") no-repeat;
background-size: contain;
}
diff --git a/src/assets/theme-assets/dashboard-custom.css b/src/assets/theme-assets/dashboard-custom.css
index a150484..8292b4f 100644
--- a/src/assets/theme-assets/dashboard-custom.css
+++ b/src/assets/theme-assets/dashboard-custom.css
@@ -64,14 +64,14 @@ html .dashboard {
.dashboard #sidebar_main .sidebar_main_header .portalLogo{
- background: url("/assets/logo-large-monitor.png") no-repeat;
+ background: url("~src/assets/logo-large-monitor.png") no-repeat;
background-size: contain ;
margin-left: 35px;
margin-top: 5px;
}
.dashboard .sidebar_mini #sidebar_main .sidebar_main_header .portalLogo{
- background: url("/assets/logo-small-monitor.png") no-repeat !important;
+ background: url("~src/assets/logo-small-monitor.png") no-repeat !important;
background-size: 50px 50px !important;
/* background-size: contain !important;
margin-left: 5px;*/
diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts
index 4faf8a2..a14ddd6 100644
--- a/src/environments/environment.prod.ts
+++ b/src/environments/environment.prod.ts
@@ -13,7 +13,7 @@ export let properties: EnvProperties = {
statisticsFrameAPIURL: "https://www.openaire.eu/stats/",
statisticsFrameNewAPIURL: "https://services.openaire.eu/stats-tool/",
useNewStatistisTool: true,
- monitorStatsFrameUrl:"https://services.openaire.eu/monitor-stats-tool/",
+ monitorStatsFrameUrl:"https://services.openaire.eu/stats-tool/",
useOldStatisticsSchema: false,
claimsAPIURL: "https://services.openaire.eu/claims/rest/claimsService/",
searchAPIURLLAst: "https://services.openaire.eu/search/v2/api/",
diff --git a/src/index.html b/src/index.html
index fc63b7d..456b6f1 100644
--- a/src/index.html
+++ b/src/index.html
@@ -4,24 +4,35 @@
-
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/karma.conf.js b/src/karma.conf.js
new file mode 100644
index 0000000..c008923
--- /dev/null
+++ b/src/karma.conf.js
@@ -0,0 +1,32 @@
+// Karma configuration file, see link for more information
+// https://karma-runner.github.io/1.0/config/configuration-file.html
+
+module.exports = function (config) {
+ config.set({
+ basePath: '',
+ frameworks: ['jasmine', '@angular-devkit/build-angular'],
+ plugins: [
+ require('karma-jasmine'),
+ require('karma-chrome-launcher'),
+ require('karma-jasmine-html-reporter'),
+ require('karma-coverage-istanbul-reporter'),
+ require('@angular-devkit/build-angular/plugins/karma')
+ ],
+ client: {
+ clearContext: false // leave Jasmine Spec Runner output visible in browser
+ },
+ coverageIstanbulReporter: {
+ dir: require('path').join(__dirname, '../coverage/monitor-dashboard'),
+ reports: ['html', 'lcovonly', 'text-summary'],
+ fixWebpackSourcePaths: true
+ },
+ reporters: ['progress', 'kjhtml'],
+ port: 9876,
+ colors: true,
+ logLevel: config.LOG_INFO,
+ autoWatch: true,
+ browsers: ['Chrome'],
+ singleRun: false,
+ restartOnFileChange: true
+ });
+};
diff --git a/src/main.server.ts b/src/main.server.ts
index d7c01cd..a085746 100644
--- a/src/main.server.ts
+++ b/src/main.server.ts
@@ -1 +1,15 @@
+/***************************************************************************************************
+ * Load `$localize` onto the global scope - used if i18n tags appear in Angular templates.
+*/
+import '@angular/localize/init';
+
+import {enableProdMode} from '@angular/core';
+
+import {properties} from './environments/environment';
+
+if (properties.environment !== "development") {
+ enableProdMode();
+}
+
export { AppServerModule } from './app/app.server.module';
+export { renderModule, renderModuleFactory } from '@angular/platform-server';
diff --git a/src/main.ts b/src/main.ts
index d8a282e..82a0683 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -9,5 +9,6 @@ if (properties.environment !== "development") {
}
document.addEventListener('DOMContentLoaded', () => {
- platformBrowserDynamic().bootstrapModule(AppModule);
+ platformBrowserDynamic().bootstrapModule(AppModule)
+ .catch(err => console.error(err));
});
diff --git a/src/polyfills.ts b/src/polyfills.ts
index 4e77c07..7c9e495 100644
--- a/src/polyfills.ts
+++ b/src/polyfills.ts
@@ -1,3 +1,7 @@
+/***************************************************************************************************
+ * Load `$localize` onto the global scope - used if i18n tags appear in Angular templates.
+ */
+import '@angular/localize/init';
/**
* This file includes polyfills needed by Angular and is loaded before the app.
* You can add your own extra polyfills to this file.
@@ -11,61 +15,53 @@
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
*
- * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
+ * Learn more in https://angular.io/guide/browser-support
*/
/***************************************************************************************************
* BROWSER POLYFILLS
*/
-/** IE9, IE10 and IE11 requires all of the following polyfills. **/
-import 'core-js/es6/symbol';
-import 'core-js/es6/object';
-import 'core-js/es6/function';
-import 'core-js/es6/parse-int';
-import 'core-js/es6/parse-float';
-import 'core-js/es6/number';
-import 'core-js/es6/math';
-import 'core-js/es6/string';
-import 'core-js/es6/date';
-import 'core-js/es6/array';
-import 'core-js/es6/regexp';
-import 'core-js/es6/map';
-import 'core-js/es6/weak-map';
-import 'core-js/es6/set';
-
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.
-/** Evergreen browsers require these. **/
-import 'core-js/es6/reflect';
-
-
/**
- * Required to support Web Animations `@angular/animation`.
- * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation
- **/
+ * Web Animations `@angular/platform-browser/animations`
+ * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
+ * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
+ */
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
-
+/**
+ * By default, zone.js will patch all possible macroTask and DomEvents
+ * user can disable parts of macroTask/DomEvents patch by setting following flags
+ * because those flags need to be set before `zone.js` being loaded, and webpack
+ * will put import in the top of bundle, so user need to create a separate file
+ * in this directory (for example: zone-flags.ts), and put the following flags
+ * into that file, and then add the following code before importing zone.js.
+ * import './zone-flags.ts';
+ *
+ * The flags allowed in zone-flags.ts are listed here.
+ *
+ * The following flags will work for all browsers.
+ *
+ * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
+ * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
+ * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
+ *
+ * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
+ * with the following flag, it will bypass `zone.js` patch for IE/Edge
+ *
+ * (window as any).__Zone_enable_cross_context_check = true;
+ *
+ */
/***************************************************************************************************
- * Zone JS is required by Angular itself.
+ * Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.
-
/***************************************************************************************************
* APPLICATION IMPORTS
*/
-
-/**
- * Date, currency, decimal and percent pipes.
- * Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10
- */
-// import 'intl'; // Run `npm install --save intl`.
-/**
- * Need to import at least one locale-data with intl.
- */
-// import 'intl/locale-data/jsonp/en';
diff --git a/src/index.prod.html b/src/prod/index.html
similarity index 58%
rename from src/index.prod.html
rename to src/prod/index.html
index 500fdce..643184f 100644
--- a/src/index.prod.html
+++ b/src/prod/index.html
@@ -4,7 +4,7 @@
-
+
@@ -21,6 +21,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/robots.prod.txt b/src/prod/robots.txt
similarity index 100%
rename from src/robots.prod.txt
rename to src/prod/robots.txt
diff --git a/src/test.ts b/src/test.ts
new file mode 100644
index 0000000..1631789
--- /dev/null
+++ b/src/test.ts
@@ -0,0 +1,20 @@
+// This file is required by karma.conf.js and loads recursively all the .spec and framework files
+
+import 'zone.js/dist/zone-testing';
+import { getTestBed } from '@angular/core/testing';
+import {
+ BrowserDynamicTestingModule,
+ platformBrowserDynamicTesting
+} from '@angular/platform-browser-dynamic/testing';
+
+declare const require: any;
+
+// First, initialize the Angular testing environment.
+getTestBed().initTestEnvironment(
+ BrowserDynamicTestingModule,
+ platformBrowserDynamicTesting()
+);
+// Then we find all the tests.
+const context = require.context('./', true, /\.spec\.ts$/);
+// And load the modules.
+context.keys().map(context);
diff --git a/src/tsconfig.app.json b/src/tsconfig.app.json
index 16b7847..f3a1b80 100644
--- a/src/tsconfig.app.json
+++ b/src/tsconfig.app.json
@@ -2,14 +2,13 @@
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
- "baseUrl": "./",
- "module": "es2015",
- "types": [
- "node"
- ]
+ "types": []
},
- "exclude": [
- "test.ts",
- "**/*.spec.ts"
+ "files": [
+ "main.ts",
+ "polyfills.ts"
+ ],
+ "include": [
+ "src/**/*.d.ts"
]
}
diff --git a/src/tsconfig.server.json b/src/tsconfig.server.json
index 7e55994..39f85aa 100644
--- a/src/tsconfig.server.json
+++ b/src/tsconfig.server.json
@@ -1,21 +1,17 @@
{
- "extends": "../tsconfig.json",
+ "extends": "./tsconfig.app.json",
"compilerOptions": {
- "outDir": "../out-tsc/app",
- "baseUrl": "./",
- // Set the module format to "commonjs":
- "module": "commonjs",
+ "outDir": "../out-tsc/app-server",
+ "target": "es2016",
"types": [
"node"
]
},
- "exclude": [
- "test.ts",
- "**/*.spec.ts"
+ "files": [
+ "main.server.ts",
+ "../server.ts"
],
- // Add "angularCompilerOptions" with the AppServerModule you wrote
- // set as the "entryModule".
"angularCompilerOptions": {
- "entryModule": "app/app.server.module#AppServerModule"
+ "entryModule": "./app/app.server.module#AppServerModule"
}
}
diff --git a/src/tsconfig.spec.json b/src/tsconfig.spec.json
new file mode 100644
index 0000000..de77336
--- /dev/null
+++ b/src/tsconfig.spec.json
@@ -0,0 +1,18 @@
+{
+ "extends": "../tsconfig.json",
+ "compilerOptions": {
+ "outDir": "../out-tsc/spec",
+ "types": [
+ "jasmine",
+ "node"
+ ]
+ },
+ "files": [
+ "test.ts",
+ "polyfills.ts"
+ ],
+ "include": [
+ "**/*.spec.ts",
+ "**/*.d.ts"
+ ]
+}
diff --git a/static.paths.ts b/static.paths.ts
deleted file mode 100644
index be309ca..0000000
--- a/static.paths.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-export const ROUTES = [
- '/',
- '/lazy',
- '/home',
- '/search/publication','/search/other','/search/project','/search/dataset','/search/dataprovider','/search/organization',
- '/search/find',
- '/search/person','/search/publication','/search/project','/search/dataset','/search/dataprovider','/search/organization',
- '/search/find/people','/search/find/publications','/search/find/other','/search/find/projects','/search/find/datasets','/search/find/dataproviders','/search/find/organizations',
- '/search/advanced/people','/search/advanced/publications','/search/advanced/other','/search/advanced/projects','/search/advanced/datasets','/search/advanced/dataproviders','/search/advanced/organizations',
- '/participate/deposit-publications','/participate/deposit-datasets','/participate/deposit-publications-result','/participate/deposit-datasets-result','/participate/deposit-subject-result',
- '/search/content-providers','/search/content-providers-table','/search/entity-registries','/search/entity-registries-table','/search/journals','/search/journals-table',
- '/project-report','/claims','/myclaims','/participate/claim','/participate/direct-claim','/claims-project-manager',
- '/test','/user-info',
- '/error', '/*path'
-];
diff --git a/tsconfig.json b/tsconfig.json
index 8cd9a30..8c693a2 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,22 +1,23 @@
{
"compileOnSave": false,
"compilerOptions": {
- "importHelpers": true,
+ "baseUrl": "./",
+ "downlevelIteration": true,
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
+ "module": "es2020",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
- "target": "es5",
+ "importHelpers": true,
+ "target": "es2015",
"typeRoots": [
"node_modules/@types"
],
"lib": [
- "es2017",
+ "es2018",
"dom"
- ],
- "module": "es2015",
- "baseUrl": "./"
+ ]
}
-}
\ No newline at end of file
+}
diff --git a/webpack.server.config.js b/webpack.server.config.js
deleted file mode 100644
index 4d2b44f..0000000
--- a/webpack.server.config.js
+++ /dev/null
@@ -1,51 +0,0 @@
-// Work around for https://github.com/angular/angular-cli/issues/7200
-
-const path = require('path');
-const webpack = require('webpack');
-
-module.exports = {
- //mode: 'none',
- entry: {
- // This is our Express server for Dynamic universal
- server: './server.ts',
- // This is an example of Static prerendering (generative)
- prerender: './prerender.ts'
- },
- target: 'node',
- resolve: { extensions: ['.ts', '.js'] },
- // Make sure we include all node_modules etc
- externals: [/(node_modules|main\..*\.js)/,],
- optimization: {
- minimize: false
- },
- output: {
- // Puts the output at the root of the dist folder
- path: path.join(__dirname, 'dist'),
- filename: '[name].js'
- },
- module: {
- rules: [
- { test: /\.ts$/, loader: 'ts-loader' }
- ,{
- // Mark files inside `@angular/core` as using SystemJS style dynamic imports.
- // Removing this will cause deprecation warnings to appear.
- test: /(\\|\/)@angular(\\|\/)core(\\|\/).+\.js$/,
- parser: { system: true },
- },
- ]
- },
- plugins: [
- new webpack.ContextReplacementPlugin(
- // fixes WARNING Critical dependency: the request of a dependency is an expression
- /(.+)?angular(\\|\/)core(.+)?/,
- path.join(__dirname, 'src'), // location of your src
- {} // a map of your routes
- ),
- new webpack.ContextReplacementPlugin(
- // fixes WARNING Critical dependency: the request of a dependency is an expression
- /(.+)?express(\\|\/)(.+)?/,
- path.join(__dirname, 'src'),
- {}
- )
- ]
-}