mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 11:11:53 +08:00
17 lines
321 B
Plaintext
17 lines
321 B
Plaintext
```js
|
|
// example-addon/src/webpack/webpackFinal.js
|
|
|
|
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;
|
|
}
|
|
```
|