Skip to content

Commit

Permalink
Merge pull request #23070 from storybookjs/norbert/angular-fix-16.1-s…
Browse files Browse the repository at this point in the history
…ome-more

Bug: Fix angular ivy-preset
(cherry picked from commit 0c0e0d0)
  • Loading branch information
ndelangen authored and github-actions[bot] committed Jun 14, 2023
1 parent 19b592d commit 817ec03
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Configuration } from 'webpack';
import { VERSION } from '@angular/core';
import * as path from 'path';
import { Preset } from '@storybook/types';

Expand Down Expand Up @@ -50,6 +49,7 @@ export const runNgcc = async () => {
};

export const webpack = async (webpackConfig: Configuration, options: PresetOptions) => {
const { VERSION } = await loadEsmModule<typeof import('@angular/core')>('@angular/core');
const framework = await options.presets.apply<Preset>('framework');
const angularOptions = (typeof framework === 'object' ? framework.options : {}) as AngularOptions;
const isAngular16OrNewer = parseInt(VERSION.major, 10) >= 16;
Expand Down

0 comments on commit 817ec03

Please sign in to comment.