Skip to content

Commit

Permalink
refactor: re-use path.resolve kimport
Browse files Browse the repository at this point in the history
  • Loading branch information
dnalborczyk committed May 31, 2022
1 parent 41ef9bc commit 732d374
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/events/http/HttpServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { join, resolve } from 'node:path'
import process, { env, exit } from 'node:process'
import h2o2 from '@hapi/h2o2'
import { Server } from '@hapi/hapi'
import * as pathUtils from 'node:path'
import authFunctionNameExtractor from '../authFunctionNameExtractor.js'
import authJWTSettingsExtractor from './authJWTSettingsExtractor.js'
import createAuthScheme from './createAuthScheme.js'
Expand Down Expand Up @@ -429,10 +428,7 @@ export default class HttpServer {
customizations &&
customizations.offline?.customAuthenticationProvider
) {
const root = pathUtils.resolve(
this.#serverless.serviceDir,
'require-resolver',
)
const root = resolve(this.#serverless.serviceDir, 'require-resolver')
const customRequire = createRequire(root)

const provider = customRequire(
Expand Down

0 comments on commit 732d374

Please sign in to comment.