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 2
2
"name" : " @testing-library/jest-dom" ,
3
3
"version" : " 0.0.0-semantically-released" ,
4
4
"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
+ },
6
17
"engines" : {
7
18
"node" : " >=8" ,
8
19
"npm" : " >=6" ,
9
20
"yarn" : " >=1"
10
21
},
11
22
"scripts" : {
12
- "build" : " kcd-scripts build " ,
23
+ "build" : " rollup -c " ,
13
24
"format" : " kcd-scripts format" ,
14
25
"lint" : " kcd-scripts lint" ,
15
26
"setup" : " npm install && npm run validate -s" ,
46
57
"jest-watch-select-projects" : " ^2.0.0" ,
47
58
"jsdom" : " ^16.2.1" ,
48
59
"kcd-scripts" : " ^11.1.0" ,
49
- "pretty-format" : " ^25.1.0"
60
+ "pretty-format" : " ^25.1.0" ,
61
+ "rollup" : " ^2.68.0"
50
62
},
51
63
"eslintConfig" : {
52
64
"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