From 25ee6c9653b86ee4bd50ab6e2409dc9dcabcb982 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Wed, 8 Nov 2023 16:45:28 +0100 Subject: [PATCH 1/2] Angular: Include object configured styles --- code/frameworks/angular/src/server/angular-cli-webpack.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/frameworks/angular/src/server/angular-cli-webpack.js b/code/frameworks/angular/src/server/angular-cli-webpack.js index 76d05ff55e72..ad617f4e38d2 100644 --- a/code/frameworks/angular/src/server/angular-cli-webpack.js +++ b/code/frameworks/angular/src/server/angular-cli-webpack.js @@ -66,6 +66,9 @@ exports.getWebpackConfig = async (baseConfig, { builderOptions, builderContext } // Options provided by user ...builderOptions, + styles: builderOptions.styles + ?.map((style) => (typeof style === 'string' ? style : style.input)) + .filter((style) => typeof style === 'string' || style.inject !== false), // Fixed options optimization: false, From 9da858e695efc8e6196cbdc4243c15565ad490c9 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Thu, 9 Nov 2023 12:23:46 +0100 Subject: [PATCH 2/2] Disable unknownContextCritical warning in webpack config --- .../builder-webpack5/src/preview/iframe-webpack.config.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/builders/builder-webpack5/src/preview/iframe-webpack.config.ts b/code/builders/builder-webpack5/src/preview/iframe-webpack.config.ts index ab97a724f491..93e1929b461a 100644 --- a/code/builders/builder-webpack5/src/preview/iframe-webpack.config.ts +++ b/code/builders/builder-webpack5/src/preview/iframe-webpack.config.ts @@ -300,6 +300,8 @@ export default async ( shouldCheckTs ? new ForkTsCheckerWebpackPlugin(tsCheckOptions) : null, ].filter(Boolean), module: { + // Disable warning for dynamic requires + unknownContextCritical: false, rules: [ { test: /\.stories\.([tj])sx?$|(stories|story)\.mdx$/,