Apply the same fix for vue3 webpack preset

This commit is contained in:
Michael Shilman 2022-09-14 15:32:36 +08:00
parent 10cfadd627
commit 05dfc5c4c9

View File

@ -24,6 +24,12 @@ export const webpack: StorybookConfig['webpack'] = (config) => {
},
{
test: /\.ts$/,
// This exclude & its .tsx counterpart below is a hack
// for storybook's sandboxing setup, which uses .ts
// story files that get processed by esbuild-loader.
// This rule is too permissive, but since we don't know
// the user's project setup, it's hard to make it specific!
exclude: [/template-stories/],
use: [
{
loader: require.resolve('ts-loader'),
@ -36,6 +42,7 @@ export const webpack: StorybookConfig['webpack'] = (config) => {
},
{
test: /\.tsx$/,
exclude: [/template-stories/],
use: [
{
loader: require.resolve('ts-loader'),