Skip to content

Commit

Permalink
chore: modify rollup config & update typescript to v5
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Apr 5, 2023
1 parent 6d95c55 commit 4578ddd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
"prepare": "npm run build",
"test": "jest --coverage",
"test:watch": "jest --watch",
"build": "rollup -c",
"start": "rollup -c -w"
"build": "rollup -c rollup.config.ts --configPlugin typescript",
"start": "rollup -c rollup.config.ts --configPlugin typescript -w"
},
"files": [
"src",
Expand All @@ -44,13 +44,13 @@
"license": "MIT",
"devDependencies": {
"@rollup/plugin-commonjs": "^24.0.1",
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-node-resolve": "^15.0.2",
"@rollup/plugin-terser": "^0.4.0",
"@rollup/plugin-typescript": "^11.0.0",
"bannerjs": "~2.1.0",
"@rollup/plugin-typescript": "^11.1.0",
"bannerjs": "^3.0.1",
"jest": "^29.4.3",
"rollup": "^3.17.3",
"rollup": "^3.20.2",
"tslib": "^2.5.0",
"typescript": "^4.9.5"
"typescript": "^5.0.3"
}
}
6 changes: 4 additions & 2 deletions rollup.config.js → rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ import typescript from '@rollup/plugin-typescript';
import commonjs from '@rollup/plugin-commonjs';
import { nodeResolve } from '@rollup/plugin-node-resolve';
import terser from '@rollup/plugin-terser';
import banner from 'bannerjs';
import * as banner from 'bannerjs';
import { createRequire } from 'module';

import pkg from './package.json' assert { type: "json" };;
const require = createRequire(import.meta.url);
const pkg = require('./package.json');

export default [{
input: 'src/index.ts',
Expand Down
4 changes: 1 addition & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,13 @@
"sourceMap": true,
"strict": true,
"strictNullChecks": true,
"suppressImplicitAnyIndexErrors": true,
"target": "es5"
},
"exclude": [
"build",
"dist",
"example",
"node_modules",
"rollup.config.js"
"node_modules"
],
"include": [
"src"
Expand Down

0 comments on commit 4578ddd

Please sign in to comment.