File tree Expand file tree Collapse file tree 2 files changed +38
-3
lines changed Expand file tree Collapse file tree 2 files changed +38
-3
lines changed Original file line number Diff line number Diff line change 22 "name" : " @testing-library/jest-dom" ,
33 "version" : " 0.0.0-semantically-released" ,
44 "description" : " Custom jest matchers to test the state of the DOM" ,
5- "main" : " dist/index.js" ,
5+ "main" : " dist/cjs/index.js" ,
6+ "module" : " dist/esm/index.js" ,
7+ "exports" : {
8+ "." : {
9+ "require" : " ./dist/cjs/index.js" ,
10+ "import" : " ./dist/esm/index.js"
11+ },
12+ "./matchers" : {
13+ "require" : " ./dist/cjs/matchers.js" ,
14+ "import" : " ./dist/esm/matchers.js"
15+ }
16+ },
617 "engines" : {
718 "node" : " >=8" ,
819 "npm" : " >=6" ,
920 "yarn" : " >=1"
1021 },
1122 "scripts" : {
12- "build" : " kcd-scripts build " ,
23+ "build" : " rollup -c " ,
1324 "format" : " kcd-scripts format" ,
1425 "lint" : " kcd-scripts lint" ,
1526 "setup" : " npm install && npm run validate -s" ,
4657 "jest-watch-select-projects" : " ^2.0.0" ,
4758 "jsdom" : " ^16.2.1" ,
4859 "kcd-scripts" : " ^11.1.0" ,
49- "pretty-format" : " ^25.1.0"
60+ "pretty-format" : " ^25.1.0" ,
61+ "rollup" : " ^2.68.0"
5062 },
5163 "eslintConfig" : {
5264 "extends" : " ./node_modules/kcd-scripts/eslint.js" ,
Original file line number Diff line number Diff line change 1+ import path from 'path'
2+ import pkg from './package.json'
3+
4+ export default [
5+ {
6+ input : {
7+ index : 'src/index.js' ,
8+ matchers : 'src/matchers.js' ,
9+ } ,
10+ output : [
11+ {
12+ dir : path . dirname ( pkg . exports [ './matchers' ] . import ) ,
13+ format : 'esm' ,
14+ } ,
15+ {
16+ dir : path . dirname ( pkg . exports [ './matchers' ] . require ) ,
17+ format : 'cjs' ,
18+ } ,
19+ ] ,
20+ external : id =>
21+ ! id . startsWith ( '\0' ) && ! id . startsWith ( '.' ) && ! id . startsWith ( '/' ) ,
22+ } ,
23+ ]
You can’t perform that action at this time.
0 commit comments