mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-06 15:31:16 +08:00
Fix detection of type: module when initializing storybook
This commit is contained in:
parent
64ede83903
commit
653a9ffe65
@ -12,6 +12,7 @@ export type GeneratorOptions = {
|
|||||||
language: SupportedLanguage;
|
language: SupportedLanguage;
|
||||||
builder: Builder;
|
builder: Builder;
|
||||||
linkable: boolean;
|
linkable: boolean;
|
||||||
|
commonJs: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export interface FrameworkOptions {
|
export interface FrameworkOptions {
|
||||||
@ -67,7 +68,7 @@ const hasInteractiveStories = (framework: SupportedFrameworks) =>
|
|||||||
export async function baseGenerator(
|
export async function baseGenerator(
|
||||||
packageManager: JsPackageManager,
|
packageManager: JsPackageManager,
|
||||||
npmOptions: NpmOptions,
|
npmOptions: NpmOptions,
|
||||||
{ language, builder }: GeneratorOptions,
|
{ language, builder, commonJs }: GeneratorOptions,
|
||||||
framework: SupportedFrameworks,
|
framework: SupportedFrameworks,
|
||||||
options: FrameworkOptions = defaultOptions
|
options: FrameworkOptions = defaultOptions
|
||||||
) {
|
) {
|
||||||
@ -150,7 +151,7 @@ export async function baseGenerator(
|
|||||||
framework: frameworkPackage,
|
framework: frameworkPackage,
|
||||||
addons: [...addons, ...stripVersions(extraAddons)],
|
addons: [...addons, ...stripVersions(extraAddons)],
|
||||||
extensions,
|
extensions,
|
||||||
commonJs: options.commonJs,
|
commonJs,
|
||||||
...mainOptions,
|
...mainOptions,
|
||||||
});
|
});
|
||||||
if (addComponents) {
|
if (addComponents) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user