Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
module.exports = (storybookBaseConfig, configType) => {
// Here reusing webpacker's style rules. It needs setting hmr config true in
// webpacker.yml. Otherwise ExtractTextPlugin will be used and result in runtime
// errors in storybook.
const rules = [
environment.loaders.get('css'),
environment.loaders.get('sass'),
environment.loaders.get('moduleCss'),
environment.loaders.get('moduleSass'),
environment.loaders.get('typescript'),
environment.loaders.get('file'),
]
storybookBaseConfig.module.rules.push(...rules)
storybookBaseConfig.resolve.extensions.push('.ts', '.tsx', 'scss');
storybookBaseConfig.resolve.modules.unshift(resolve(config.source_path))
return storybookBaseConfig
}