From 817ec036ece6c19c9850748980a887fb633f28f3 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 14 Jun 2023 14:40:12 +0200 Subject: [PATCH] Merge pull request #23070 from storybookjs/norbert/angular-fix-16.1-some-more Bug: Fix angular ivy-preset (cherry picked from commit 0c0e0d0811aae91456cbc4c6bef8b10e594bb951) --- .../angular/src/server/framework-preset-angular-ivy.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/frameworks/angular/src/server/framework-preset-angular-ivy.ts b/code/frameworks/angular/src/server/framework-preset-angular-ivy.ts index 5d22cf4210cc..987df7f78005 100644 --- a/code/frameworks/angular/src/server/framework-preset-angular-ivy.ts +++ b/code/frameworks/angular/src/server/framework-preset-angular-ivy.ts @@ -1,5 +1,4 @@ import { Configuration } from 'webpack'; -import { VERSION } from '@angular/core'; import * as path from 'path'; import { Preset } from '@storybook/types'; @@ -50,6 +49,7 @@ export const runNgcc = async () => { }; export const webpack = async (webpackConfig: Configuration, options: PresetOptions) => { + const { VERSION } = await loadEsmModule('@angular/core'); const framework = await options.presets.apply('framework'); const angularOptions = (typeof framework === 'object' ? framework.options : {}) as AngularOptions; const isAngular16OrNewer = parseInt(VERSION.major, 10) >= 16;