mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-06 15:31:16 +08:00
796 B
796 B
export function webpackFinal(config, options = {}) {
const rules = [
...(config.module?.rules || []),
{
test: /\.custom-file-extension$/,
loader: require.resolve(`custom-loader`),
},
];
config.module.rules = rules;
return config;
}
import type { Configuration as WebpackConfig } from 'webpack';
export function webpackFinal(config: WebpackConfig, options: any = {}) {
const rules = [
...(config.module?.rules || []),
{
test: /\.custom-file$/,
loader: require.resolve(`custom-loader`),
},
];
config.module.rules = rules;
return config;
}