14 lines
408 B
TypeScript
14 lines
408 B
TypeScript
import { Configuration } from 'webpack';
|
|
import { updateBabelOptions } from '../src/utils/babel-utils';
|
|
|
|
// Adds react preset for JSX support
|
|
function getBabelWebpackConfig(config: Configuration) {
|
|
const babelRuleOptions = config.module.rules.find(
|
|
r => r.loader === 'babel-loader'
|
|
).options as any;
|
|
updateBabelOptions(babelRuleOptions);
|
|
return config;
|
|
}
|
|
|
|
module.exports = getBabelWebpackConfig;
|