build: switch to bundler moduleResolution

This commit is contained in:
iCrawl
2023-05-01 13:14:13 +02:00
parent 8b71f44b1f
commit 48cab844d4
53 changed files with 186 additions and 79 deletions

View File

@@ -2,7 +2,7 @@ import { createServer } from 'node:http';
import { REST } from '@discordjs/rest';
import supertest from 'supertest';
import { MockAgent, setGlobalDispatcher, type Interceptable } from 'undici';
import type { MockInterceptor } from 'undici/types/mock-interceptor';
import type { MockInterceptor } from 'undici/types/mock-interceptor.js';
import { beforeEach, afterAll, afterEach, test, expect } from 'vitest';
import { proxyRequests } from '../src/index.js';

View File

@@ -18,9 +18,9 @@
"module": "./dist/index.mjs",
"typings": "./dist/index.d.ts",
"exports": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"types": "./dist/index.d.ts"
"require": "./dist/index.js"
},
"directories": {
"lib": "src",

View File

@@ -1,7 +1,7 @@
import { URL } from 'node:url';
import type { RequestMethod, REST, RouteLike } from '@discordjs/rest';
import { populateSuccessfulResponse, populateErrorResponse } from '../util/responseHelpers.js';
import type { RequestHandler } from '../util/util';
import type { RequestHandler } from '../util/util.js';
/**
* Creates an HTTP handler used to forward requests to Discord