Skip to content

Commit 79ffcb1

Browse files
cherry-pick: Add workaround to an angular issue (#168) (#169)
Co-authored-by: volkov.vladislav <[email protected]>
1 parent c79f0d5 commit 79ffcb1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/devextreme-cli/testing/env.angular.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const path = require('path');
33

44
const rimraf = require('./utils/rimraf-async');
55
const runCommand = require('../utility/run-command');
6+
const packageJsonUtils = require('../utility/package-json-utils');
67

78
const appName = 'my-app';
89
const sandboxPath = path.join(process.cwd(), './testing/sandbox/angular');
@@ -45,6 +46,12 @@ exports.createApp = async() => {
4546
silent: true
4647
});
4748

49+
const scripts = [
50+
{ name: 'prestart', value: 'ngcc --properties es2015 browser module main --async false' }
51+
];
52+
// https://github.com/angular/angular/issues/36278
53+
packageJsonUtils.updateScripts(path.join(sandboxPath, appName), scripts);
54+
4855
const data = fs.readFileSync(routingFilePath, 'utf8');
4956
const result = data.replace('RouterModule.forRoot(routes)', 'RouterModule.forRoot(routes, {useHash: true})');
5057
fs.writeFileSync(routingFilePath, result, 'utf8');

0 commit comments

Comments
 (0)