From d547a12415709b51d293863c7d909e31c81683d6 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Wed, 22 Jun 2022 23:15:43 +0200 Subject: [PATCH] fixes --- presets/react-webpack/src/framework-preset-cra.ts | 14 ++++++++++++++ renderers/svelte/package.json | 5 ++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/presets/react-webpack/src/framework-preset-cra.ts b/presets/react-webpack/src/framework-preset-cra.ts index fe8dce90b4a..82364ef0ab8 100644 --- a/presets/react-webpack/src/framework-preset-cra.ts +++ b/presets/react-webpack/src/framework-preset-cra.ts @@ -25,5 +25,19 @@ export const webpackFinal: StorybookConfig['webpack'] = (config, { presetsList } checkForNewPreset(presetsList); } } + config.module?.rules?.push( + ...[ + { + test: /\.m?js$/, + type: 'javascript/auto', + }, + { + test: /\.m?js$/, + resolve: { + fullySpecified: false, + }, + }, + ] + ); return config; }; diff --git a/renderers/svelte/package.json b/renderers/svelte/package.json index a16f969bbaa..cb05a3aef58 100644 --- a/renderers/svelte/package.json +++ b/renderers/svelte/package.json @@ -34,7 +34,10 @@ "require": "./package.json", "import": "./package.json", "types": "./package.json" - } + }, + "./templates/HOC.svelte": "./templates/HOC.svelte", + "./templates/PreviewRender.svelte": "./templates/PreviewRender.svelte", + "./templates/SlotDecorator.svelte": "./templates/SlotDecorator.svelte" }, "main": "dist/index.js", "module": "dist/index.mjs",