From 961fff4179407804350b14f4f5631ce1fad9ded6 Mon Sep 17 00:00:00 2001 From: Katerina Skroumpelou Date: Thu, 19 Jan 2023 17:46:11 +0200 Subject: [PATCH] fix(storybook): revert to previous defaults for Storybook CLI options --- docs/generated/packages/storybook/executors/build.json | 6 ++---- docs/generated/packages/storybook/executors/storybook.json | 6 ++---- .../storybook/src/executors/build-storybook/schema.json | 6 ++---- packages/storybook/src/executors/storybook/schema.json | 6 ++---- packages/webpack/src/utils/with-nx.ts | 6 ++++-- 5 files changed, 12 insertions(+), 18 deletions(-) diff --git a/docs/generated/packages/storybook/executors/build.json b/docs/generated/packages/storybook/executors/build.json index 1377c6dcdcd48..3d3da2a4e2c22 100644 --- a/docs/generated/packages/storybook/executors/build.json +++ b/docs/generated/packages/storybook/executors/build.json @@ -100,13 +100,11 @@ }, "quiet": { "type": "boolean", - "description": "Suppress verbose build output.", - "default": false + "description": "Suppress verbose build output." }, "docs": { "type": "boolean", - "description": "Starts Storybook in documentation mode. Learn more about it : https://storybook.js.org/docs/react/writing-docs/build-documentation#preview-storybooks-documentation.", - "default": false + "description": "Starts Storybook in documentation mode. Learn more about it : https://storybook.js.org/docs/react/writing-docs/build-documentation#preview-storybooks-documentation." } }, "definitions": { diff --git a/docs/generated/packages/storybook/executors/storybook.json b/docs/generated/packages/storybook/executors/storybook.json index 511b97291e0f0..2258abbcac37b 100644 --- a/docs/generated/packages/storybook/executors/storybook.json +++ b/docs/generated/packages/storybook/executors/storybook.json @@ -73,13 +73,11 @@ }, "quiet": { "type": "boolean", - "description": "Suppress verbose build output.", - "default": false + "description": "Suppress verbose build output." }, "docs": { "type": "boolean", - "description": "Starts Storybook in documentation mode. Learn more about it : https://storybook.js.org/docs/react/writing-docs/build-documentation#preview-storybooks-documentation.", - "default": false + "description": "Starts Storybook in documentation mode. Learn more about it : https://storybook.js.org/docs/react/writing-docs/build-documentation#preview-storybooks-documentation." }, "docsMode": { "type": "boolean", diff --git a/packages/storybook/src/executors/build-storybook/schema.json b/packages/storybook/src/executors/build-storybook/schema.json index 262eafed4cdfc..888e0fc7e13e9 100644 --- a/packages/storybook/src/executors/build-storybook/schema.json +++ b/packages/storybook/src/executors/build-storybook/schema.json @@ -77,13 +77,11 @@ }, "quiet": { "type": "boolean", - "description": "Suppress verbose build output.", - "default": false + "description": "Suppress verbose build output." }, "docs": { "type": "boolean", - "description": "Starts Storybook in documentation mode. Learn more about it : https://storybook.js.org/docs/react/writing-docs/build-documentation#preview-storybooks-documentation.", - "default": false + "description": "Starts Storybook in documentation mode. Learn more about it : https://storybook.js.org/docs/react/writing-docs/build-documentation#preview-storybooks-documentation." } }, "definitions": { diff --git a/packages/storybook/src/executors/storybook/schema.json b/packages/storybook/src/executors/storybook/schema.json index 3bfdec4178eae..6ea526c1b445c 100644 --- a/packages/storybook/src/executors/storybook/schema.json +++ b/packages/storybook/src/executors/storybook/schema.json @@ -75,13 +75,11 @@ }, "quiet": { "type": "boolean", - "description": "Suppress verbose build output.", - "default": false + "description": "Suppress verbose build output." }, "docs": { "type": "boolean", - "description": "Starts Storybook in documentation mode. Learn more about it : https://storybook.js.org/docs/react/writing-docs/build-documentation#preview-storybooks-documentation.", - "default": false + "description": "Starts Storybook in documentation mode. Learn more about it : https://storybook.js.org/docs/react/writing-docs/build-documentation#preview-storybooks-documentation." }, "docsMode": { "type": "boolean", diff --git a/packages/webpack/src/utils/with-nx.ts b/packages/webpack/src/utils/with-nx.ts index 6b4f29b6a67b9..41c3ebf0df8b0 100644 --- a/packages/webpack/src/utils/with-nx.ts +++ b/packages/webpack/src/utils/with-nx.ts @@ -164,7 +164,7 @@ export function withNx(opts?: { skipTypeChecking?: boolean }) { profile: options.statsJson, resolve: { ...config.resolve, - extensions, + extensions: [...extensions, ...(config?.resolve?.extensions ?? [])], alias: options.fileReplacements.reduce( (aliases, replacement) => ({ ...aliases, @@ -173,9 +173,10 @@ export function withNx(opts?: { skipTypeChecking?: boolean }) { {} ), plugins: [ + ...(config.resolve?.plugins ?? []), new TsconfigPathsPlugin({ configFile: options.tsConfig, - extensions, + extensions: [...extensions, ...(config?.resolve?.extensions ?? [])], mainFields, }), ], @@ -231,6 +232,7 @@ export function withNx(opts?: { skipTypeChecking?: boolean }) { // Enabled for performance unsafeCache: true, rules: [ + ...(config?.module?.rules ?? []), options.sourceMap && { test: /\.js$/, enforce: 'pre' as const,