feat: remove unnecessary export default for better tree-shaking

This commit is contained in:
JellyBrick
2025-09-06 22:31:02 +09:00
parent 26fa1f85b2
commit c1a06ab955
29 changed files with 53 additions and 81 deletions

View File

@ -2,8 +2,8 @@ import { type BrowserWindow, globalShortcut } from 'electron';
import is from 'electron-is';
import { register as registerElectronLocalShortcut } from 'electron-localshortcut';
import registerMPRIS from './mpris';
import getSongControls from '@/providers/song-controls';
import { registerMPRIS } from './mpris';
import { getSongControls } from '@/providers/song-controls';
import type { ShortcutMappingType, ShortcutsPluginConfig } from './index';

View File

@ -19,8 +19,8 @@ import {
type SongInfo,
SongInfoEvent,
} from '@/providers/song-info';
import getSongControls from '@/providers/song-controls';
import config from '@/config';
import { getSongControls } from '@/providers/song-controls';
import * as config from '@/config';
import { LoggerPrefix } from '@/utils';
import type { RepeatMode, VolumeState } from '@/types/datahost-get-state';
@ -84,7 +84,7 @@ function setupMPRIS() {
return instance;
}
function registerMPRIS(win: BrowserWindow) {
export function registerMPRIS(win: BrowserWindow) {
const songControls = getSongControls(win);
const {
playPause,
@ -363,5 +363,3 @@ function registerMPRIS(win: BrowserWindow) {
console.trace(error);
}
}
export default registerMPRIS;