forceConsistentCasingInFileNames to true

This commit is contained in:
Chocobozzz 2021-08-27 16:42:17 +02:00
parent 94b13cf4b3
commit e874edd9f8
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
3 changed files with 5 additions and 4 deletions

View File

@ -2,7 +2,7 @@ import { Server as TrackerServer } from 'bittorrent-tracker'
import express from 'express' import express from 'express'
import { createServer } from 'http' import { createServer } from 'http'
import proxyAddr from 'proxy-addr' import proxyAddr from 'proxy-addr'
import { Server as WebSocketServer } from 'ws' import { WebSocketServer } from 'ws'
import { Redis } from '@server/lib/redis' import { Redis } from '@server/lib/redis'
import { logger } from '../helpers/logger' import { logger } from '../helpers/logger'
import { CONFIG } from '../initializers/config' import { CONFIG } from '../initializers/config'

View File

@ -164,9 +164,10 @@ let rootPath: string
function root () { function root () {
if (rootPath) return rootPath if (rootPath) return rootPath
// We are in /helpers/utils.js rootPath = __dirname
rootPath = join(__dirname, '..', '..')
if (basename(rootPath) === 'helpers') rootPath = resolve(rootPath, '..')
if (basename(rootPath) === 'server') rootPath = resolve(rootPath, '..')
if (basename(rootPath) === 'dist') rootPath = resolve(rootPath, '..') if (basename(rootPath) === 'dist') rootPath = resolve(rootPath, '..')
return rootPath return rootPath

View File

@ -10,6 +10,7 @@
"removeComments": true, "removeComments": true,
"strictBindCallApply": true, "strictBindCallApply": true,
"esModuleInterop": true, "esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"outDir": "./dist", "outDir": "./dist",
"lib": [ "lib": [
"dom", "dom",
@ -20,7 +21,6 @@
"es2019" "es2019"
], ],
"typeRoots": [ "typeRoots": [
"node_modules/sitemap/node_modules/@types",
"node_modules/@types", "node_modules/@types",
"server/typings" "server/typings"
], ],