|
2 | 2 | "name": "dom-accessibility-api", |
3 | 3 | "version": "0.4.1", |
4 | 4 | "main": "dist/index.js", |
5 | | - "types": "dist/index.d.ts", |
| 5 | + "type": "commonjs", |
| 6 | + "exports": { |
| 7 | + "import": "dist/index.mjs", |
| 8 | + "require": "dist/index.js" |
| 9 | + }, |
6 | 10 | "license": "MIT", |
7 | 11 | "repository": { |
8 | 12 | "type": "git", |
|
16 | 20 | "dist/" |
17 | 21 | ], |
18 | 22 | "scripts": { |
19 | | - "build": "yarn build:clean && yarn build:source && yarn build:types", |
| 23 | + "build": "yarn build:clean && yarn build:source && yarn build:source:cjs && yarn build:types", |
20 | 24 | "build:clean": "rimraf dist", |
21 | | - "build:source": "babel sources --extensions \".ts\" --ignore \"**/__tests__/**/*\" --out-dir dist/ --source-maps", |
| 25 | + "build:source": "babel sources --extensions \".ts\" --ignore \"**/__tests__/**/*\" --out-dir dist/ --out-file-extension=.mjs --source-maps", |
| 26 | + "build:source:cjs": "cross-env BABEL_ENV=cjs babel sources --extensions \".ts\" --ignore \"**/__tests__/**/*\" --out-dir dist/ --out-file-extension=.js --source-maps", |
22 | 27 | "build:types": "tsc -p tsconfig.json --emitDeclarationOnly", |
23 | 28 | "format": "prettier \"**/*.{json,js,md,ts,yml}\" --write --ignore-path .prettierignore", |
24 | 29 | "lint": "eslint --report-unused-disable-directives \"sources/**/*.ts\"", |
|
40 | 45 | "devDependencies": { |
41 | 46 | "@babel/cli": "^7.8.4", |
42 | 47 | "@babel/core": "^7.8.7", |
| 48 | + "@babel/plugin-transform-modules-commonjs": "^7.9.0", |
43 | 49 | "@babel/preset-env": "^7.8.7", |
44 | 50 | "@babel/preset-typescript": "^7.8.3", |
45 | 51 | "@changesets/changelog-github": "^0.2.2", |
|
49 | 55 | "@typescript-eslint/eslint-plugin": "^2.23.0", |
50 | 56 | "@typescript-eslint/parser": "^2.23.0", |
51 | 57 | "concurrently": "^5.1.0", |
| 58 | + "cross-env": "^7.0.2", |
52 | 59 | "cypress": "^4.1.0", |
53 | 60 | "eslint": "^6.8.0", |
54 | 61 | "jest": "^25.1.0", |
|
0 commit comments