mirror of
https://github.com/zimplexing/OrionTV.git
synced 2026-02-04 03:36:29 +08:00
- Add Logger utility with tagged output and environment-based control - Configure Babel to remove console calls in production builds - Replace all console.* calls across stores, services, and components with Logger - Enable development-only logging with formatted output and component tags - Optimize production builds by eliminating all logging code
15 lines
303 B
JavaScript
15 lines
303 B
JavaScript
module.exports = function (api) {
|
|
api.cache(true);
|
|
|
|
const plugins = [];
|
|
|
|
// 在生产环境移除console调用以优化性能
|
|
if (process.env.NODE_ENV === 'production') {
|
|
plugins.push('transform-remove-console');
|
|
}
|
|
|
|
return {
|
|
presets: ['babel-preset-expo'],
|
|
plugins,
|
|
};
|
|
}; |