mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
build: tsup for better cjs / esm support
This commit is contained in:
@@ -15,4 +15,4 @@ RUN yarn workspaces focus
|
||||
COPY ./packages/proxy-container ./
|
||||
RUN yarn build && yarn workspaces focus --production
|
||||
|
||||
CMD ["node", "--enable-source-maps", "./dist/index.mjs"]
|
||||
CMD ["node", "--enable-source-maps", "./dist/index.js"]
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
import { createUnbuildConfig } from '../../build.config';
|
||||
|
||||
export default createUnbuildConfig({ emitCJS: false, cjsBridge: false });
|
||||
@@ -3,15 +3,15 @@
|
||||
"version": "1.0.0",
|
||||
"description": "Lightweight HTTP proxy for Discord's API, brought to you as a container 📦",
|
||||
"scripts": {
|
||||
"build": "unbuild",
|
||||
"build": "tsup",
|
||||
"lint": "prettier --check . && TIMING=1 eslint src --ext mjs,js,ts",
|
||||
"format": "prettier --write . && TIMING=1 eslint src --ext mjs,js,ts --fix",
|
||||
"fmt": "yarn format",
|
||||
"prepack": "yarn lint && yarn test && yarn build",
|
||||
"changelog": "git cliff --prepend ./CHANGELOG.md -u -c ./cliff.toml -r ../../ --include-path 'packages/proxy-container/*'"
|
||||
},
|
||||
"main": "./dist/index.mjs",
|
||||
"type": "module",
|
||||
"module": "./dist/index.js",
|
||||
"directories": {
|
||||
"lib": "src"
|
||||
},
|
||||
@@ -53,9 +53,8 @@
|
||||
"eslint": "^8.23.0",
|
||||
"eslint-config-neon": "^0.1.23",
|
||||
"prettier": "^2.7.1",
|
||||
"rollup-plugin-typescript2": "^0.33.0",
|
||||
"typescript": "^4.8.2",
|
||||
"unbuild": "^0.8.9"
|
||||
"tsup": "^6.2.3",
|
||||
"typescript": "^4.8.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.9.0"
|
||||
|
||||
6
packages/proxy-container/tsup.config.js
Normal file
6
packages/proxy-container/tsup.config.js
Normal file
@@ -0,0 +1,6 @@
|
||||
import { createTsupConfig } from '../../tsup.config.js';
|
||||
|
||||
export default createTsupConfig({
|
||||
format: ['esm'],
|
||||
minify: true,
|
||||
});
|
||||
Reference in New Issue
Block a user