File tree Expand file tree Collapse file tree 3 files changed +24
-20
lines changed Expand file tree Collapse file tree 3 files changed +24
-20
lines changed Original file line number Diff line number Diff line change 13
13
"plugin:react/recommended",
14
14
"prettier"
15
15
],
16
+ "exclude": ["scripts/*.js"],
16
17
"rules": {
17
18
"deprecation/deprecation": "error",
18
19
"react-hooks/rules-of-hooks": "error",
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env node
2
+ // This script defines the type of exports in the dist directory using minimal
3
+ // package.json files. Setting the type in the main package.json file does not
4
+ // work because we want to support both CommonJS and ES Module exports in the
5
+ // same package.
6
+
7
+ const FS = require ( 'node:fs' )
8
+
9
+ const DIST_DIR = 'dist'
10
+
11
+ FS . writeFileSync (
12
+ `${ DIST_DIR } /cjs/package.json` ,
13
+ JSON . stringify ( {
14
+ type : 'commonjs' ,
15
+ } ) ,
16
+ )
17
+
18
+ FS . writeFileSync (
19
+ `${ DIST_DIR } /esm/package.json` ,
20
+ JSON . stringify ( {
21
+ type : 'module' ,
22
+ } ) ,
23
+ )
You can’t perform that action at this time.
0 commit comments