Skip to content

Commit

Permalink
Add type: module to package.json (#413)
Browse files Browse the repository at this point in the history
  • Loading branch information
zaporter-work authored Nov 15, 2024
1 parent d14368b commit ed26414
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 150 deletions.
145 changes: 0 additions & 145 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@
"main": "./dist/main.umd.js",
"module": "./dist/main.es.js",
"types": "./dist/main.d.ts",
"type": "module",
"files": [
"dist"
],
"exports": {
".": {
"types": "./dist/main.d.ts",
"import": "./dist/main.es.js",
"require": "./dist/main.umd.js"
"require": "./dist/main.umd.js",
"default": "./dist/main.es.js"
}
},
"scripts": {
"prebuild": "ts-node ./scripts/write-versions.ts",
"prebuild": "node ./scripts/write-versions.js",
"build": "npm run build:bundle && npm run build:types && npm run build:copy-dts",
"build:bundle": "vite build",
"build:types": "tsc --project tsconfig.build.json",
Expand Down Expand Up @@ -77,7 +78,6 @@
"npm-check": "^6.0.1",
"prettier": "^3.1.1",
"prettier-plugin-jsdoc": "^1.1.1",
"ts-node": "^10.9.2",
"typedoc": "^0.25.4",
"typescript": "^5.3.3",
"vite": "^5.0.10",
Expand Down
2 changes: 1 addition & 1 deletion scripts/write-versions.ts → scripts/write-versions.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const fs = require('node:fs');
import fs from 'node:fs';

const apiVersion = fs.readFileSync('./api_version.lock').toString().trim();
fs.writeFileSync(
Expand Down

0 comments on commit ed26414

Please sign in to comment.