Skip to content

Commit 8ef6c48

Browse files
committed
fix and improve comments
1 parent 977262d commit 8ef6c48

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

packages/storybook-builder/src/generate-app-script.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// based on https://github.com/storybookjs/storybook/blob/v7.0.9/code/lib/builder-vite/src/codegen-modern-iframe-script.ts
1+
// based on https://github.com/storybookjs/storybook/blob/v8.5.0/code/builders/builder-vite/src/codegen-modern-iframe-script.ts
22

33
import { normalizePath } from '@rollup/pluginutils';
44
import { loadPreviewOrConfigFile } from '@storybook/core-common';

packages/storybook-builder/src/generate-iframe-html.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// based on https://github.com/storybookjs/storybook/blob/v8.5.0/code/builders/builder-vite/src/transform-iframe-html.ts
2+
13
import { normalizeStories } from '@storybook/core-common';
24
import type { DocsOptions, Options, TagsOptions } from '@storybook/types';
35
import { readFile } from 'node:fs/promises';

packages/storybook-builder/src/generate-setup-addons-script.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// based on https://github.com/storybookjs/storybook/blob/v7.0.9/code/lib/builder-vite/src/codegen-set-addon-channel.ts
1+
// based on https://github.com/storybookjs/storybook/blob/v8.5.0/code/builders/builder-vite/src/codegen-set-addon-channel.ts
22

33
export async function generateSetupAddonsScript() {
44
return `

packages/storybook-builder/src/generate-stories-script.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// based on https://github.com/storybookjs/storybook/blob/v7.0.9/code/lib/builder-vite/src/codegen-importfn-script.ts
1+
// based on https://github.com/storybookjs/storybook/blob/v8.5.0/code/builders/builder-vite/src/codegen-importfn-script.ts
22

33
import { normalizePath } from '@rollup/pluginutils';
44
import { logger } from '@storybook/node-logger';

packages/storybook-builder/src/list-stories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// based on https://github.com/storybookjs/storybook/blob/v7.0.9/code/lib/builder-vite/src/list-stories.ts
1+
// based on https://github.com/storybookjs/storybook/blob/v8.5.0/code/builders/builder-vite/src/list-stories.ts
22

33
import { normalizeStories } from '@storybook/core-common';
44
import type { Options } from '@storybook/types';

packages/storybook-builder/src/rollup-plugin-mdx.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ export function rollupPluginMdx(options: Options): Plugin {
3535
const mdxLoaderOptions = await options.presets.apply('mdxLoaderOptions', {
3636
...mdxPluginOptions,
3737
mdxCompileOptions: {
38-
// TODO(storybook): this is done by Storybook in 3 different places:
39-
// 1. addon-essential preset (so not always working for all users who install plugins individually)
40-
// 2. addon-docs vite plugin (so not applicable to our builder)
41-
// 3. addon-docs webpack loader (also no applicable for us)
42-
// so we need to do this here too, for people who individually include addon-docs
38+
// this is done by Storybook in 3 different places:
39+
// 1. addon-essentials preset (not working for users who install addon-docs directly without addon-essentials)
40+
// 2. addon-docs vite plugin (not run for our builder, because it's in the builder-vite hook)
41+
// 3. addon-docs webpack loader (not run for our builder, because it's in the builder-webpack hook)
42+
// so we need to duplicate same logic here
4343
providerImportSource: join(
4444
dirname(require.resolve('@storybook/addon-docs/package.json')),
4545
'/dist/shims/mdx-react-shim.mjs',

packages/storybook-builder/src/rollup-plugin-prebundle-modules.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,7 @@ export function rollupPluginPrebundleModules(
6565
};
6666
}
6767

68-
// TODO(storybook): update the CANDIDATES list
69-
70-
// this is different to https://github.com/storybookjs/storybook/blob/v7.0.0/code/lib/builder-vite/src/optimizeDeps.ts#L7
68+
// this is different to https://github.com/storybookjs/storybook/blob/v8.5.0/code/builders/builder-vite/src/optimizeDeps.ts
7169
// builder-vite bundles different dependencies for performance reasons
7270
// we aim only at browserifying NodeJS dependencies (CommonJS/process.env/...)
7371
export const CANDIDATES = [

0 commit comments

Comments
 (0)