diff --git a/package.json b/package.json index fe414f2..eb1a0f7 100644 --- a/package.json +++ b/package.json @@ -7,10 +7,10 @@ "license": "GPL-3.0-or-later", "bin": "./dist/index.js", "scripts": { - "build": "rollup -c", + "build": "tsc", "lint": "eslint --fix src/**/*.ts", - "package:alpine": "rollup -c --environment PRODUCTION && pkg -t node18-alpine-x64 -C brotli -o dist/wahpkg dist/index.js", - "package:linux": "rollup -c --environment PRODUCTION && pkg -t node18-linux-x64 -C brotli -o dist/wahpkg dist/index.js" + "package:alpine": "pkg -t node18-alpine-x64 -C brotli -o dist/wahpkg dist/index.js", + "package:linux": "pkg -t node18-linux-x64 -C brotli -o dist/wahpkg dist/index.js" }, "dependencies": { "chalk": "^5.2.0", @@ -22,9 +22,6 @@ "type-fest": "^3.5.1" }, "devDependencies": { - "@rollup/plugin-commonjs": "^24.0.0", - "@rollup/plugin-node-resolve": "^15.0.1", - "@rollup/plugin-terser": "^0.3.0", "@rushstack/eslint-patch": "^1.2.0", "@types/fs-extra": "^11.0.1", "@types/proper-lockfile": "^4.1.2", @@ -34,8 +31,6 @@ "@yarnpkg/sdks": "3.0.0-rc.35", "eslint": "^8.31.0", "pkg": "^5.8.0", - "rollup": "^3.10.0", - "rollup-plugin-typescript2": "^0.34.1", "typescript": "^4.9.4" } } diff --git a/rollup.config.js b/rollup.config.js deleted file mode 100644 index 996ca75..0000000 --- a/rollup.config.js +++ /dev/null @@ -1,39 +0,0 @@ -import commonjs from '@rollup/plugin-commonjs'; -import { nodeResolve } from '@rollup/plugin-node-resolve'; -import process from 'node:process'; -import { terser } from 'rollup-plugin-terser'; -import typescript from 'rollup-plugin-typescript2'; - -let rollup = {}; - -if (process.env.PRODUCTION) { - rollup = { - input: 'src/index.ts', - output: { - dir: 'dist', - format: 'cjs', - }, - plugins: [ - commonjs(), - nodeResolve({ exportConditions: ['node'] }), - typescript(), - terser(), - ], - }; -} else { - rollup = { - input: 'src/index.ts', - output: { - dir: 'dist', - format: 'esm', - }, - plugins: [ - commonjs(), - nodeResolve({ exportConditions: ['node'] }), - typescript(), - ], - }; - -} - -export default rollup; diff --git a/tsconfig.json b/tsconfig.json index 7a174d6..3e5ae57 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,13 +1,17 @@ { "compilerOptions": { - "module": "ESNext", + "module": "ES2022", "moduleResolution": "NodeNext", "lib": [ "ES2022", "dom" ], - "target": "ESNext", + "target": "ES2022", "allowSyntheticDefaultImports": true, - "esModuleInterop": true - } + "esModuleInterop": true, + "outDir": "dist" + }, + "include": [ + "src/**/*.ts" + ] }