From 4a453a90b52b17c3fa9b6ed6058cd10192a7de4c Mon Sep 17 00:00:00 2001 From: puku0x Date: Fri, 21 Oct 2022 14:15:44 -0700 Subject: [PATCH] fix(react): fix builder options for storybook plugin --- packages/react/plugins/storybook/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/react/plugins/storybook/index.ts b/packages/react/plugins/storybook/index.ts index 7aebbe6961a2e..e62db3befd13b 100644 --- a/packages/react/plugins/storybook/index.ts +++ b/packages/react/plugins/storybook/index.ts @@ -9,6 +9,7 @@ import { workspaceRoot, } from '@nrwl/devkit'; import { getBaseWebpackPartial } from '@nrwl/webpack/src/utils/config'; +import { NormalizedWebpackExecutorOptions } from '@nrwl/webpack/src/executors/webpack/schema'; import { getStylesPartial } from '@nrwl/webpack/src/executors/webpack/lib/get-webpack-config'; import { checkAndCleanWithSemver } from '@nrwl/workspace/src/utilities/version-utils'; import { join } from 'path'; @@ -100,7 +101,7 @@ export const webpack = async ( const tsconfigPath = join(options.configDir, 'tsconfig.json'); - const builderOptions: any = { + const builderOptions: NormalizedWebpackExecutorOptions = { ...options, root: options.configDir, sourceRoot: '', @@ -115,6 +116,7 @@ export const webpack = async ( optimization: {}, tsConfig: tsconfigPath, extractCss: storybookWebpackConfig.mode === 'production', + target: 'web', }; const esm = true;