|
2 | 2 | "name": "@testing-library/preact", |
3 | 3 | "version": "0.0.0-semantically-released", |
4 | 4 | "description": "Simple and complete Preact DOM testing utilities that encourage good testing practices.", |
5 | | - "main": "dist/index.js", |
| 5 | + "main": "dist/cjs/index.js", |
| 6 | + "module": "dist/esm/index.js", |
6 | 7 | "types": "types/index.d.ts", |
| 8 | + "exports": { |
| 9 | + ".": { |
| 10 | + "types": "./types/index.d.ts", |
| 11 | + "import": "./dist/esm/index.js", |
| 12 | + "browser": "./dist/cjs/index.js" |
| 13 | + }, |
| 14 | + "./pure": { |
| 15 | + "types": "./pure.d.ts", |
| 16 | + "import": "./dist/esm/pure.js", |
| 17 | + "browser": "./dist/cjs/pure.js" |
| 18 | + } |
| 19 | + }, |
7 | 20 | "license": "MIT", |
8 | 21 | "author": "Rahim Alwer <[email protected]>", |
9 | 22 | "homepage": "https://github.com/testing-library/preact-testing-library#readme", |
|
33 | 46 | "dist", |
34 | 47 | "dont-cleanup-after-each.js", |
35 | 48 | "pure.js", |
36 | | - "types/index.d.ts" |
| 49 | + "types/index.d.ts", |
| 50 | + "pure.d.ts" |
37 | 51 | ], |
38 | 52 | "scripts": { |
39 | 53 | "toc": "doctoc README.md", |
40 | 54 | "lint": "eslint src/**/*.js --fix", |
41 | 55 | "clean": "rimraf dist", |
42 | | - "build": " babel src --out-dir dist --ignore '**/__tests__/**,**/__mocks__/**'", |
| 56 | + "build": "npm run build:cjs && npm run build:esm", |
| 57 | + "build:cjs": "babel src --out-dir dist/cjs --config-file ./.babelrc --ignore '**/__tests__/**,**/__mocks__/**'", |
| 58 | + "build:esm": "babel src --no-babelrc --out-dir dist/esm --config-file ./.babelrc.esm.json --ignore '**/__tests__/**,**/__mocks__/**'", |
43 | 59 | "test": "jest src/__tests__ ", |
44 | 60 | "test:watch": "npm test --watch", |
45 | 61 | "test:update": "npm test --updateSnapshot --coverage", |
|
0 commit comments