Skip to content

Commit

Permalink
Replace babel with esbuuild
Browse files Browse the repository at this point in the history
  • Loading branch information
magne4000 committed Aug 10, 2023
1 parent d82fda0 commit 87a9fe9
Show file tree
Hide file tree
Showing 11 changed files with 219 additions and 1,393 deletions.
17 changes: 0 additions & 17 deletions .babelrc

This file was deleted.

2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = {

// https://eslint.vuejs.org/user-guide/#faq
parserOptions: {
parser: '@babel/eslint-parser',
parser: '@typescript-eslint/parser',
ecmaVersion: 2022,
sourceType: 'module',
},
Expand Down
19 changes: 9 additions & 10 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
'PR: waiting for review':
- '*'
- '.babelrc'
- '*'
- '.editorconfig'
- '.eslintignore'
- '.eslintrc.js'
- '.gitignore'
- '.prettierrc'
- '.whitesource'
- '.github/**/*'
- '.vscode/**/*'
- '_icons/**/*'
- '_scripts/**/*'
- 'src/**/*'
- 'static/**/*'
- '.prettierrc'
- '.whitesource'
- '.github/**/*'
- '.vscode/**/*'
- '_icons/**/*'
- '_scripts/**/*'
- 'src/**/*'
- 'static/**/*'

'PR: dependencies':
- 'yarn.lock'
Expand Down
5 changes: 4 additions & 1 deletion _scripts/webpack.main.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ const config = {
rules: [
{
test: /\.[tj]s$/,
use: 'babel-loader',
loader: 'esbuild-loader',
exclude: /node_modules/,
options: {
target: 'esnext'
}
}
],
},
Expand Down
5 changes: 4 additions & 1 deletion _scripts/webpack.renderer.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@ const config = {
rules: [
{
test: /\[tj]s$/,
use: 'babel-loader',
loader: 'esbuild-loader',
exclude: /node_modules/,
options: {
target: 'esnext'
}
},
{
test: /\.vue$/,
Expand Down
5 changes: 4 additions & 1 deletion _scripts/webpack.web.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ const config = {
rules: [
{
test: /\.[tj]s$/,
use: 'babel-loader',
loader: 'esbuild-loader',
exclude: /node_modules/,
options: {
target: 'es2020'
}
},
{
test: /\.vue$/,
Expand Down
7 changes: 1 addition & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,20 +82,15 @@
"youtubei.js": "^5.8.0"
},
"devDependencies": {
"@babel/core": "^7.22.9",
"@babel/eslint-parser": "^7.22.9",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/preset-env": "^7.22.9",
"@babel/preset-typescript": "^7.22.5",
"@double-great/stylelint-a11y": "^2.0.2",
"@typescript-eslint/eslint-plugin": "^6.3.0",
"@typescript-eslint/parser": "^6.3.0",
"babel-loader": "^9.1.3",
"copy-webpack-plugin": "^11.0.0",
"css-loader": "^6.8.1",
"css-minimizer-webpack-plugin": "^5.0.1",
"electron": "^22.3.18",
"electron-builder": "^24.6.3",
"esbuild-loader": "^4.0.0",
"eslint": "^8.46.0",
"eslint-config-prettier": "^9.0.0",
"eslint-config-standard": "^17.1.0",
Expand Down
3 changes: 3 additions & 0 deletions src/renderer/test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { resolve } from 'node:path'

resolve('')
8 changes: 3 additions & 5 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"module": "es6",
"target": "ESNext",
"allowJs": true,
"moduleResolution": "node",
"allowSyntheticDefaultImports": true,
"moduleResolution": "bundler",
"useDefineForClassFields": true,
"sourceMap": true,
"lib": ["ESNext", "DOM"],
Expand All @@ -16,8 +17,5 @@
"isolatedModules": true,
"esModuleInterop": true
},
"exclude": ["src/main"],
"references": [
{ "path": "./tsconfig.node.json" }
]
"include": ["src"]
}
10 changes: 0 additions & 10 deletions tsconfig.node.json

This file was deleted.

Loading

0 comments on commit 87a9fe9

Please sign in to comment.