storybook/code/frameworks/nextjs/src/font/webpack/configureNextFont.ts
2022-12-19 14:59:13 +01:00

15 lines
424 B
TypeScript

import type { Configuration } from 'webpack';
export function configureNextFont(baseConfig: Configuration) {
baseConfig.plugins = [...(baseConfig.plugins || [])];
baseConfig.resolveLoader = {
...baseConfig.resolveLoader,
alias: {
...baseConfig.resolveLoader?.alias,
'storybook-nextjs-font-loader': require.resolve(
'./font/webpack/loader/storybook-nextjs-font-loader'
),
},
};
}