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..e41311d 100644 --- a/package.json +++ b/package.json @@ -3,8 +3,8 @@ "version": "1.0.0-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/*"