File tree Expand file tree Collapse file tree 3 files changed +9
-15
lines changed
Expand file tree Collapse file tree 3 files changed +9
-15
lines changed Original file line number Diff line number Diff line change 77 "umd" : " dist/index.umd.js" ,
88 "types" : " dist/index.d.ts" ,
99 "files" : [
10- " dist/**/*.js "
10+ " dist"
1111 ],
1212 "sideEffects" : false ,
1313 "license" : " MIT" ,
109109 },
110110 "scripts" : {
111111 "clean-build" : " npm-run-all clean build" ,
112- "build" : " tsc --outDir dist --declarationDir dist --declaration true && rollup -c" ,
112+ "build" : " tsc --outDir dist --declarationDir dist --declaration true --emitDeclarationOnly true && rollup -c" ,
113113 "build-watch" : " rollup -c -w" ,
114114 "clean" : " rimraf dist" ,
115115 "typecheck" : " tsc -p --noEmit" ,
Original file line number Diff line number Diff line change 1- // For Node versions 17.5+ import assertion can be used
2- // import pkg from './package.json' assert { type: 'json' };
3- import { createRequire } from 'node:module' ;
4- const require = createRequire ( import . meta. url ) ;
5- const pkg = require ( './package.json' ) ;
6-
71import path from 'path' ;
82import babel from '@rollup/plugin-babel' ;
93import replace from '@rollup/plugin-replace' ;
104import { terser } from 'rollup-plugin-terser' ;
115import { DEFAULT_EXTENSIONS } from '@babel/core' ;
126import typescript from '@rollup/plugin-typescript' ;
7+ import { createRequire } from 'node:module' ;
8+
9+ const require = createRequire ( import . meta. url ) ;
10+ const pkg = require ( './package.json' ) ;
1311
1412const globals = {
1513 'react' : 'React' ,
@@ -27,8 +25,7 @@ const external = (id) => id.includes('@babel/runtime') || (!id.startsWith('.') &
2725 */
2826const replacePlugin = replace ( {
2927 preventAssignment : true ,
30- __ENVIRONMENT__ : 'production' ,
31- // 'process.env.NODE_ENV': JSON.stringify('production')
28+ 'process.env.NODE_ENV' : JSON . stringify ( 'production' ) ,
3229} ) ;
3330
3431// Remove data-testid attribute (since undefined in non-test environments)
@@ -106,8 +103,7 @@ export default [
106103 input,
107104 output : {
108105 file : pkg . module ,
109- format : 'es' ,
110- // exports: 'named',
106+ format : 'esm' ,
111107 } ,
112108 plugins : commonPlugins ( true ) ,
113109 } ,
Original file line number Diff line number Diff line change 11{
22 "compilerOptions" : {
33 "jsx" : " react" ,
4- "target" : " ES2020 " ,
4+ "target" : " ES2018 " ,
55 "module" : " ESNext" ,
66 "moduleResolution" : " node" ,
77 "strict" : true ,
8- "allowJs" : false ,
98 "skipLibCheck" : true ,
109 "noUnusedLocals" : true ,
1110 "esModuleInterop" : true ,
1211 "isolatedModules" : true ,
13- "resolveJsonModule" : true ,
1412 "noFallthroughCasesInSwitch" : true ,
1513 "forceConsistentCasingInFileNames" : true
1614 },
You can’t perform that action at this time.
0 commit comments