mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-23 14:40:50 +01:00
28 lines
816 B
JavaScript
28 lines
816 B
JavaScript
module.exports = {
|
|
eslint: {
|
|
enabled: false
|
|
},
|
|
webpack: {
|
|
configure: (webpackConfig) => ({
|
|
...webpackConfig,
|
|
module: {
|
|
...webpackConfig.module,
|
|
rules: webpackConfig.module.rules.map((rule) =>
|
|
{
|
|
if(!rule.oneOf) return rule;
|
|
|
|
return {
|
|
...rule,
|
|
oneOf: rule.oneOf.map((ruleObject) =>
|
|
{
|
|
if(!new RegExp(ruleObject.test).test('.ts') || !ruleObject.include) return ruleObject;
|
|
|
|
return { ...ruleObject, include: undefined };
|
|
})
|
|
};
|
|
})
|
|
}
|
|
})
|
|
}
|
|
}
|