Created
July 8, 2019 05:14
-
-
Save alexzuza/15f713334a225937bf3547102d5cbe10 to your computer and use it in GitHub Desktop.
t5
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
const { AngularCompilerPlugin } = require('./node_modules/@ngtools/webpack/src/angular_compiler_plugin.js'); | |
const old = AngularCompilerPlugin.prototype._createOrUpdateProgram; | |
AngularCompilerPlugin.prototype._createOrUpdateProgram = async function() { | |
await old.apply(this, arguments); | |
const sourceFile = this._program.tsProgram.getSourceFiles().find(sf => sf.fileName.endsWith('app.module.ngfactory.ts')); | |
console.log(sourceFile.text); | |
}; | |
require('./node_modules/@angular/cli/bin/ng'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment