This commit is contained in:
Eugene Pankov 2023-02-26 18:28:31 +01:00
parent 324ca6ed82
commit 90e00fdcac
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4
20 changed files with 58 additions and 20 deletions

View File

@ -1,7 +1,8 @@
import * as path from 'path'
import wp from 'webpack'
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer'
const __dirname = path.dirname(new URL(import.meta.url).pathname)
import * as url from 'url'
const __dirname = url.fileURLToPath(new URL('.', import.meta.url))
const config = {
name: 'tabby-main',

View File

@ -1,7 +1,9 @@
import * as fs from 'fs'
import * as path from 'path'
import wp from 'webpack'
const __dirname = path.dirname(new URL(import.meta.url).pathname)
import * as url from 'url'
const __dirname = url.fileURLToPath(new URL('.', import.meta.url))
import { AngularWebpackPlugin } from '@ngtools/webpack'
import { createEs2015LinkerPlugin } from '@angular/compiler-cli/linker/babel'
const linkerPlugin = createEs2015LinkerPlugin({

View File

@ -3,7 +3,9 @@ import { rebuild } from 'electron-rebuild'
import * as path from 'path'
import * as vars from './vars.mjs'
const __dirname = path.dirname(new URL(import.meta.url).pathname)
import * as url from 'url'
const __dirname = url.fileURLToPath(new URL('.', import.meta.url))
if (process.platform === 'win32' || process.platform === 'linux') {
process.env.ARCH = ((process.env.ARCH || process.arch) === 'arm') ? 'armv7l' : process.env.ARCH || process.arch

View File

@ -3,7 +3,9 @@ import jsYaml from 'js-yaml'
import fs from 'node:fs'
import path from 'node:path'
const __dirname = path.dirname(new URL(import.meta.url).pathname)
import * as url from 'url'
const __dirname = url.fileURLToPath(new URL('.', import.meta.url))
const metadata = jsYaml.load(fs.readFileSync(path.resolve(__dirname, '../node_modules/@fortawesome/fontawesome-free/metadata/icons.yml')))

View File

@ -6,7 +6,9 @@ import fs from 'node:fs'
import * as vars from './vars.mjs'
import log from 'npmlog'
const __dirname = path.dirname(new URL(import.meta.url).pathname)
import * as url from 'url'
const __dirname = url.fileURLToPath(new URL('.', import.meta.url))
let target = path.resolve(__dirname, '../builtin-plugins')
sh.mkdir('-p', target)

View File

@ -3,7 +3,8 @@ import * as fs from 'fs'
import * as semver from 'semver'
import * as childProcess from 'child_process'
const __dirname = path.dirname(new URL(import.meta.url).pathname)
import * as url from 'url'
const __dirname = url.fileURLToPath(new URL('.', import.meta.url))
const electronInfo = JSON.parse(fs.readFileSync(path.resolve(__dirname, '../node_modules/electron/package.json')))

View File

@ -1,5 +1,7 @@
import * as path from 'path'
const __dirname = path.dirname(new URL(import.meta.url).pathname)
import * as url from 'url'
const __dirname = url.fileURLToPath(new URL('.', import.meta.url))
import config from '../webpack.plugin.config.mjs'
export default () => {

View File

@ -1,5 +1,7 @@
import * as path from 'path'
const __dirname = path.dirname(new URL(import.meta.url).pathname)
import * as url from 'url'
const __dirname = url.fileURLToPath(new URL('.', import.meta.url))
import config from '../webpack.plugin.config.mjs'
export default () => config({

View File

@ -1,5 +1,7 @@
import * as path from 'path'
const __dirname = path.dirname(new URL(import.meta.url).pathname)
import * as url from 'url'
const __dirname = url.fileURLToPath(new URL('.', import.meta.url))
import config from '../webpack.plugin.config.mjs'
export default () => config({

View File

@ -1,5 +1,7 @@
import * as path from 'path'
const __dirname = path.dirname(new URL(import.meta.url).pathname)
import * as url from 'url'
const __dirname = url.fileURLToPath(new URL('.', import.meta.url))
import config from '../webpack.plugin.config.mjs'
export default () => config({

View File

@ -1,5 +1,7 @@
import * as path from 'path'
const __dirname = path.dirname(new URL(import.meta.url).pathname)
import * as url from 'url'
const __dirname = url.fileURLToPath(new URL('.', import.meta.url))
import config from '../webpack.plugin.config.mjs'
export default () => config({

View File

@ -1,5 +1,7 @@
import * as path from 'path'
const __dirname = path.dirname(new URL(import.meta.url).pathname)
import * as url from 'url'
const __dirname = url.fileURLToPath(new URL('.', import.meta.url))
import config from '../webpack.plugin.config.mjs'
export default () => config({

View File

@ -1,5 +1,7 @@
import * as path from 'path'
const __dirname = path.dirname(new URL(import.meta.url).pathname)
import * as url from 'url'
const __dirname = url.fileURLToPath(new URL('.', import.meta.url))
import config from '../webpack.plugin.config.mjs'
export default () => config({

View File

@ -1,5 +1,7 @@
import * as path from 'path'
const __dirname = path.dirname(new URL(import.meta.url).pathname)
import * as url from 'url'
const __dirname = url.fileURLToPath(new URL('.', import.meta.url))
import config from '../webpack.plugin.config.mjs'
export default () => config({

View File

@ -1,5 +1,7 @@
import * as path from 'path'
const __dirname = path.dirname(new URL(import.meta.url).pathname)
import * as url from 'url'
const __dirname = url.fileURLToPath(new URL('.', import.meta.url))
import config from '../webpack.plugin.config.mjs'
export default () => config({

View File

@ -1,5 +1,7 @@
import * as path from 'path'
const __dirname = path.dirname(new URL(import.meta.url).pathname)
import * as url from 'url'
const __dirname = url.fileURLToPath(new URL('.', import.meta.url))
import config from '../webpack.plugin.config.mjs'
export default () => config({

View File

@ -1,5 +1,7 @@
import * as path from 'path'
const __dirname = path.dirname(new URL(import.meta.url).pathname)
import * as url from 'url'
const __dirname = url.fileURLToPath(new URL('.', import.meta.url))
import config from '../webpack.plugin.config.mjs'
export default () => {

View File

@ -1,5 +1,7 @@
import * as path from 'path'
const __dirname = path.dirname(new URL(import.meta.url).pathname)
import * as url from 'url'
const __dirname = url.fileURLToPath(new URL('.', import.meta.url))
import config from '../webpack.plugin.config.mjs'
export default () => config({

View File

@ -1,5 +1,7 @@
import * as path from 'path'
const __dirname = path.dirname(new URL(import.meta.url).pathname)
import * as url from 'url'
const __dirname = url.fileURLToPath(new URL('.', import.meta.url))
import config from '../webpack.plugin.config.mjs'
export default () => config({

View File

@ -1,5 +1,7 @@
import * as path from 'path'
const __dirname = path.dirname(new URL(import.meta.url).pathname)
import * as url from 'url'
const __dirname = url.fileURLToPath(new URL('.', import.meta.url))
const externals = {}
for (const key of [