Closed slh-swisslog closed 12 months ago
FWIW I figured it out. The fix was to change the way the import with a promise to a require.
import(`../${this.name}/${this.name}.component.html?raw`).then((res) => {
was replaced with:
const html = require(`../${this.name}/${this.name}.component.html?raw`);
This is not an issue with Angular builders itself, but rather a third-party configuration problem. Better avenue for support is StackOverflow, but since this is an issue tracker and not a support forum, this issue will be closed.
Describe the Bug
I have an application that loads MD, HTML, and TS files at runtime to display sample usage code for other developers. The same custom webpack configuration worked with Ng14 and Ng15 but fails to build after upgrading to Ng16. I tried both @angular-builders/custom-webpack 16.0.0 and 16.0.1.
Minimal Reproduction
https://github.com/shuppert/CustomWebpackNg15 https://github.com/shuppert/CustomWebpackNg16
Expected Behavior
The code should build under Ng16 the same as it did under prior versions.
Screenshots
Environment