移除 babel

This commit is contained in:
lyswhut
2026-04-10 09:10:58 +08:00
parent cc192cab44
commit e35895d752
14 changed files with 24 additions and 1965 deletions

View File

@@ -1,26 +0,0 @@
{
"presets": [
"@babel/preset-typescript",
[
"@babel/preset-env",
{
"corejs": "3",
"useBuiltIns": "usage"
}
]
// [
// "minify",
// {
// "builtIns": false,
// "evaluate": false,
// "mangle": false
// }
// ]
],
"plugins": [
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-transform-modules-umd",
"@babel/plugin-transform-runtime",
"@babel/plugin-transform-class-properties"
]
}

View File

@@ -55,7 +55,6 @@ const vueRule = {
exports.base = {
extends: ['standard'],
rules: baseRule,
parser: '@babel/eslint-parser',
}
exports.html = {

View File

@@ -19,15 +19,6 @@ module.exports = merge(baseConfig, {
externals: [
// ...Object.keys(dependencies || {}).filter(d => !whiteListedModules.includes(d)),
],
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/,
},
],
},
plugins: [
new webpack.DefinePlugin({
'process.env': {

View File

@@ -18,15 +18,6 @@ module.exports = merge(baseConfig, {
externals: [
// ...Object.keys(dependencies || {}).filter(d => !whiteListedModules.includes(d)),
],
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/,
},
],
},
plugins: [
new webpack.DefinePlugin({
'process.env': {

View File

@@ -39,15 +39,6 @@ module.exports = merge(baseConfig, {
externals: [
// ...Object.keys(dependencies || {}).filter(d => !whiteListedModules.includes(d)),
],
module: {
rules: [
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/,
},
],
},
plugins: [
new CopyWebpackPlugin({
patterns: [

View File

@@ -1,12 +1,12 @@
{
"compilerOptions": {
"baseUrl": "./",
"rootDir": "./",
"paths": {
"@main/*": ["src/main/*"],
"@renderer/*": ["src/renderer/*"],
"@lyric/*": ["src/renderer-lyric/*"],
"@static/*": ["src/static/*"],
"@common/*": ["src/common/*"],
"@main/*": ["./src/main/*"],
"@renderer/*": ["./src/renderer/*"],
"@lyric/*": ["./src/renderer-lyric/*"],
"@static/*": ["./src/static/*"],
"@common/*": ["./src/common/*"],
}
},
"vueCompilerOptions": {

1878
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -107,15 +107,6 @@
},
"homepage": "https://github.com/lyswhut/lx-music-desktop#readme",
"devDependencies": {
"@babel/core": "^7.29.0",
"@babel/eslint-parser": "^7.28.6",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-transform-class-properties": "^7.28.6",
"@babel/plugin-transform-modules-umd": "^7.27.1",
"@babel/plugin-transform-runtime": "^7.29.0",
"@babel/preset-env": "^7.29.2",
"@babel/preset-typescript": "^7.28.5",
"@babel/runtime": "^7.29.2",
"@tsconfig/recommended": "^1.0.13",
"@types/better-sqlite3": "^7.6.13",
"@types/needle": "^3.3.0",
@@ -123,7 +114,6 @@
"@types/tunnel": "^0.0.7",
"@types/ws": "8.5.4",
"@vue/language-plugin-pug": "^3.2.6",
"babel-loader": "^10.1.1",
"browserslist": "^4.28.1",
"chalk": "^4.1.2",
"changelog-parser": "^3.0.1",

View File

@@ -5,7 +5,7 @@
"./types"
],
"paths": { /* Specify a set of entries that re-map imports to additional lookup locations. */
"@common/*": ["common/*"],
"@common/*": ["./*"],
},
},
}

View File

@@ -5,10 +5,10 @@
"./types"
],
"paths": { /* Specify a set of entries that re-map imports to additional lookup locations. */
"@common/*": ["common/*"],
"@main/*": ["main/*"],
"@static/*": ["static/*"],
"@/*": ["./*"],
"@common/*": ["../common/*"],
"@main/*": ["../main/*"],
"@static/*": ["../static/*"],
"@/*": ["../*"],
},
},
}

View File

@@ -3,11 +3,11 @@
"compilerOptions": {
"isolatedModules": true,
"paths": { /* Specify a set of entries that re-map imports to additional lookup locations. */
"@common/*": ["common/*"],
"@common/*": ["../common/*"],
// "@renderer/*": ["renderer/*"],
"@lyric/*": ["renderer-lyric/*"],
"@static/*": ["static/*"],
"@root/*": ["./*"],
"@lyric/*": ["../renderer-lyric/*"],
"@static/*": ["../static/*"],
"@root/*": ["../*"],
},
"typeRoots": [ /* Specify multiple folders that act like './node_modules/@types'. */
"./types"

View File

@@ -3,11 +3,11 @@
"compilerOptions": {
"isolatedModules": true,
"paths": { /* Specify a set of entries that re-map imports to additional lookup locations. */
"@common/*": ["common/*"],
"@renderer/*": ["renderer/*"],
// "@lyric/*": ["renderer-lyric/*"],
"@static/*": ["static/*"],
"@root/*": ["./*"],
"@common/*": ["../common/*"],
"@renderer/*": ["../renderer/*"],
// "@lyric/*": ["../renderer-lyric/*"],
"@static/*": ["../static/*"],
"@root/*": ["../*"],
},
"typeRoots": [ /* Specify multiple folders that act like './node_modules/@types'. */
"./types"

View File

@@ -1,7 +1,7 @@
import { checkPath, joinPath, extname, basename, readFile, getFileStats } from '@common/utils/nodejs'
import { formatPlayTime } from '@common/utils/common'
import type { IComment } from 'music-metadata/lib/type'
import { decodeKrc } from '@common/utils/lyricUtils/kg'
import { type IAudioMetadata } from 'music-metadata'
export const checkDownloadFileAvailable = async(musicInfo: LX.Download.ListItem, savePath: string): Promise<boolean> => {
return musicInfo.isComplate && !/\.ape$/.test(musicInfo.metadata.fileName) &&
@@ -164,6 +164,7 @@ export const getLocalMusicFilePic = async(path: string) => {
// return lyricInfo
// }
type IComment = NonNullable<IAudioMetadata['common']['comment']> extends Array<infer U> ? U : never
/**
* 获取歌曲文件歌词

View File

@@ -5,10 +5,10 @@
"target": "ESNext",
"allowJs": true,
"module": "ESNext",
"moduleResolution": "Node",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"rootDir": "./",
"outDir": "./dist",
"baseUrl": "./src", /* Specify the base directory to resolve non-relative module names. */
// "paths": { /* Specify a set of entries that re-map imports to additional lookup locations. */
// "@common/*": ["common/*"],
// "@renderer/*": ["renderer/*"],