mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-01 05:05:25 +08:00
Provide migration instructions for source-loader
This commit is contained in:
parent
a7cb5c20e3
commit
7d740f9e6b
@ -1,6 +1,7 @@
|
||||
import fs from 'fs-extra';
|
||||
import remarkSlug from 'remark-slug';
|
||||
import remarkExternalLinks from 'remark-external-links';
|
||||
import { dedent } from 'ts-dedent';
|
||||
|
||||
import type {
|
||||
CoreCommon_IndexerOptions,
|
||||
@ -50,6 +51,8 @@ export async function webpack(
|
||||
webpackConfig: any = {},
|
||||
options: Options &
|
||||
BabelParams & {
|
||||
/** @deprecated */
|
||||
sourceLoaderOptions: any;
|
||||
csfPluginOptions: CsfPluginOptions | null;
|
||||
transcludeMarkdown: boolean;
|
||||
} /* & Parameters<
|
||||
@ -67,6 +70,7 @@ export async function webpack(
|
||||
mdxBabelOptions,
|
||||
configureJSX = true,
|
||||
csfPluginOptions = {},
|
||||
sourceLoaderOptions = null,
|
||||
transcludeMarkdown = false,
|
||||
} = options;
|
||||
|
||||
@ -76,7 +80,15 @@ export async function webpack(
|
||||
remarkPlugins: [remarkSlug, remarkExternalLinks],
|
||||
};
|
||||
|
||||
logger.info(`Addon-docs: using MDX2`);
|
||||
if (sourceLoaderOptions) {
|
||||
throw new Error(dedent`
|
||||
Addon-docs no longer uses source-loader in 7.0.
|
||||
|
||||
To update your configuration, please see migration instructions here:
|
||||
|
||||
https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#dropped-source-loader--storiesof-static-snippets
|
||||
`);
|
||||
}
|
||||
|
||||
const mdxLoader = require.resolve('@storybook/mdx2-csf/loader');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user