From 14479ef662c29e8ab9b5b6d9f75868c5b36c5d22 Mon Sep 17 00:00:00 2001 From: Kyle Date: Fri, 7 Jun 2024 13:43:48 -0400 Subject: [PATCH] bump es target to es2020 --- example/example.ts | 2 +- package.json | 10 +++++----- tsconfig.json | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/example/example.ts b/example/example.ts index 6b14448..d43c783 100644 --- a/example/example.ts +++ b/example/example.ts @@ -1,3 +1,3 @@ -import { init } from '../dist/es2015'; +import { init } from '../dist/es2020'; init('http://localhost:8080/pdf.worker.min.mjs'); \ No newline at end of file diff --git a/package.json b/package.json index 6a9dcca..e31b4a7 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,10 @@ { "name": "document-viewer-ts", - "version": "1.0.0-legacy", + "version": "1.0.1-legacy", "description": "PDF and MS Doc viewer written in TypeScript for React and vanilla JavaScript", "main": "dist/lib/index.js", - "module": "dist/es2015/index.js", - "types": "dist/es2015/index.d.ts", + "module": "dist/es2020/index.js", + "types": "dist/es2020/index.d.ts", "engines": { "node": ">=18.15.0" }, @@ -13,8 +13,8 @@ "styles" ], "scripts": { - "build": "npm run build-es2015", - "build-es2015": "tsc -p tsconfig.json", + "build": "npm run build-es2020", + "build-es2020": "tsc -p tsconfig.json", "build-example": "npm run build && tsc -p tsconfig.example.json && webpack", "clean": "rimraf ./dist ./build", "lint:no-fix": "eslint --config='.eslintrc.js' './src/*.{ts,tsx}' './tests/*.{ts,tsx}'", diff --git a/tsconfig.json b/tsconfig.json index fec37f1..fa4e596 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,9 +8,9 @@ "jsx": "react", "lib": [ "dom", - "es2015" + "es2020" ], - "module": "es2015", + "module": "es2020", "moduleResolution": "node", "noEmitOnError": true, "noErrorTruncation": true, @@ -21,10 +21,10 @@ "noUnusedLocals": false, "noUnusedParameters": false, "pretty": true, - "outDir": "./dist/es2015", + "outDir": "./dist/es2020", "sourceMap": true, "strict": true, - "target": "es2015" + "target": "es2020" }, "include": [ "src/*"