2021-09-16 00:48:43 -04:00
|
|
|
module.exports = {
|
|
|
|
eslint: {
|
2021-09-16 23:47:07 -04:00
|
|
|
enable: false
|
2021-09-16 23:16:54 -04:00
|
|
|
},
|
|
|
|
webpack: {
|
|
|
|
configure: (webpackConfig) => ({
|
|
|
|
...webpackConfig,
|
2022-03-15 16:56:15 -04:00
|
|
|
module: {
|
|
|
|
...webpackConfig.module,
|
|
|
|
rules: [
|
|
|
|
...webpackConfig.module.rules,
|
|
|
|
// {
|
|
|
|
// test: /\.(png|jpg|gif)$/i,
|
|
|
|
// use: [
|
|
|
|
// {
|
|
|
|
// loader: 'url-loader',
|
|
|
|
// options: {
|
|
|
|
// limit: false,
|
|
|
|
// },
|
|
|
|
// } ,
|
|
|
|
// ],
|
|
|
|
// }
|
|
|
|
].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 };
|
|
|
|
})
|
|
|
|
};
|
|
|
|
})
|
|
|
|
},
|
2021-09-20 04:17:38 -04:00
|
|
|
optimization: {
|
|
|
|
...webpackConfig.optimization,
|
|
|
|
splitChunks: {
|
|
|
|
cacheGroups: {
|
|
|
|
vendor: {
|
|
|
|
name: 'vendors',
|
|
|
|
test: /[\\/]node_modules[\\/]/,
|
|
|
|
chunks: 'all',
|
|
|
|
},
|
|
|
|
renderer: {
|
|
|
|
name: 'renderer',
|
|
|
|
test: /[\\/]node_modules[\\/]@nitrots[\\/]nitro-renderer[\\/]/,
|
|
|
|
chunks: 'all',
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-09-16 23:16:54 -04:00
|
|
|
}
|
|
|
|
})
|
2021-09-16 00:48:43 -04:00
|
|
|
}
|
|
|
|
}
|