mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 11:03:30 +01:00
build: tsup for better cjs / esm support
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
import { createUnbuildConfig } from '../../build.config';
|
||||
|
||||
export default createUnbuildConfig({
|
||||
entries: [
|
||||
{ builder: 'rollup', input: 'src/index' },
|
||||
{ builder: 'rollup', input: 'src/formatTag/index' },
|
||||
],
|
||||
preserveModules: false,
|
||||
minify: true,
|
||||
emitCJS: false,
|
||||
});
|
||||
@@ -5,7 +5,7 @@
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"test": "vitest run",
|
||||
"build": "unbuild",
|
||||
"build": "tsup",
|
||||
"lint": "prettier --check . && TIMING=1 eslint src __tests__ --ext mjs,js,ts",
|
||||
"format": "prettier --write . && TIMING=1 eslint src __tests__ --ext mjs,js,ts --fix",
|
||||
"fmt": "yarn format"
|
||||
@@ -48,9 +48,8 @@
|
||||
"eslint": "^8.23.0",
|
||||
"eslint-config-neon": "^0.1.23",
|
||||
"prettier": "^2.7.1",
|
||||
"rollup-plugin-typescript2": "^0.33.0",
|
||||
"tsup": "^6.2.3",
|
||||
"typescript": "^4.8.2",
|
||||
"unbuild": "^0.8.9",
|
||||
"vitest": "^0.22.1"
|
||||
},
|
||||
"engines": {
|
||||
|
||||
7
packages/actions/tsup.config.js
Normal file
7
packages/actions/tsup.config.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import { createTsupConfig } from '../../tsup.config.js';
|
||||
|
||||
export default createTsupConfig({
|
||||
entry: ['src/index.ts', 'src/formatTag/index.ts'],
|
||||
format: ['esm'],
|
||||
minify: true,
|
||||
});
|
||||
Reference in New Issue
Block a user