Skip to content

Commit

Permalink
fix: assertNotInAngularZone should act as a noop
Browse files Browse the repository at this point in the history
  • Loading branch information
arturovt committed Apr 19, 2024
1 parent 3fc4fa6 commit a3b5978
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions libs/single-spa-angular/src/single-spa-angular.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ async function bootstrap(options: BootstrappedSingleSpaAngularOptions): Promise<
// is being executed or under which application, making it difficult to assert whether this
// app is running under its zone.
options.NgZone.assertInAngularZone = () => {};
options.NgZone.assertNotInAngularZone = () => {};

options.routingEventListener = () => {
options.bootstrappedNgZone!.run(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,13 @@ function tryToRemoveMiniCssExtractThroughConditions(childRule: ChildRule): void
);

if (cssMiniExtractIndex >= 0) {
childRuleCondition.use![cssMiniExtractIndex] = { loader: 'style-loader' };
childRuleCondition.use![cssMiniExtractIndex] = {
loader: 'style-loader',
// @ts-ignore
options: {
styleTagTransform: require.resolve('./styleTagTransform.js'),
},
};
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
function styleTagTransform(css, style) {
console.trace();
// eslint-disable-next-line no-param-reassign
style.innerHTML = `${css}.modify{}\n`;

document.head.appendChild(style);
}

module.exports = styleTagTransform;

0 comments on commit a3b5978

Please sign in to comment.