-
Notifications
You must be signed in to change notification settings - Fork 12k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(@ngtools/webpack): emit
require
in replace resources when using…
… CommonJS as module When using CommonJs as module format TypeScript will generate unreferenced `require` when using `ts.createImportDeclaration`. ```js const external_component_html_1 = require("!raw-loader!./external.component.html"); const core_1 = require("@angular/core"); let ExampleComponent = class ExampleComponent { }; ExampleComponent = __decorate([ core_1.Component({ selector: 'example-compoent', template: __NG_CLI_RESOURCE__0, }) ], ExampleComponent); ``` More context: microsoft/TypeScript#18369 (comment) Closes #18718 (cherry picked from commit 179b6ca)
- Loading branch information
1 parent
430c099
commit 75ca7f9
Showing
2 changed files
with
85 additions
and
28 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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