File tree 5 files changed +26
-7
lines changed
5 files changed +26
-7
lines changed Original file line number Diff line number Diff line change 1
1
module . exports = {
2
2
preset : "ts-jest" ,
3
3
testEnvironment : "./fix-jsdom-env.ts" ,
4
+ globals : {
5
+ "ts-jest" : {
6
+ tsconfig : "tsconfig.test.json" ,
7
+ } ,
8
+ } ,
4
9
} ;
Original file line number Diff line number Diff line change 24
24
"type" : " module" ,
25
25
"scripts" : {
26
26
"dev" : " vite" ,
27
- "build" : " tsc && vite build" ,
27
+ "build" : " vite build" ,
28
28
"preview" : " vite preview" ,
29
29
"publish-minor" : " npm run build && npm version minor && npm publish --access public && git push && git push --tags" ,
30
30
"test" : " jest" ,
31
31
"test:update-snapshots" : " npm test -- -u"
32
32
},
33
- "main" : " ./dist/json-ui.umd.cjs " ,
33
+ "main" : " ./dist/json-ui.umd.js " ,
34
34
"module" : " ./dist/json-ui.es.js" ,
35
- "types" : " ./dist/src/ index.d.ts" ,
35
+ "types" : " ./dist/index.d.ts" ,
36
36
"exports" : {
37
37
"." : {
38
38
"import" : " ./dist/json-ui.js" ,
39
- "require" : " ./dist/json-ui.umd.cjs "
39
+ "require" : " ./dist/json-ui.umd.js "
40
40
}
41
41
},
42
42
"files" : [
Original file line number Diff line number Diff line change 9
9
"esModuleInterop" : true ,
10
10
"declaration" : true ,
11
11
"outDir" : " ./dist" ,
12
+ "rootDir" : " ./src" ,
12
13
13
14
/* Bundler mode */
14
15
"moduleResolution" : " bundler" ,
23
24
"noUnusedParameters" : true ,
24
25
"noFallthroughCasesInSwitch" : true
25
26
},
26
- "include" : [" src" ]
27
+ "include" : [" src" ],
28
+ "exclude" : [" src/**/*.spec.ts" ]
27
29
}
Original file line number Diff line number Diff line change
1
+ {
2
+ "extends" : " ./tsconfig.json" ,
3
+ "compilerOptions" : {
4
+ "rootDir" : " ./"
5
+ },
6
+ "include" : [" src/**/*.spec.ts" ]
7
+ }
Original file line number Diff line number Diff line change @@ -11,11 +11,16 @@ export default defineConfig({
11
11
} ,
12
12
} ,
13
13
build : {
14
+ outDir : "dist" ,
14
15
lib : {
15
16
entry : resolve ( __dirname , "src/index.ts" ) ,
16
17
name : "json-ui" ,
17
- fileName : ( format ) => `json-ui.${ format } .js`
18
+ fileName : ( format ) => `json-ui.${ format } .js` ,
19
+ } ,
20
+ rollupOptions : {
21
+ output : {
22
+ dir : "dist" ,
23
+ } ,
18
24
} ,
19
- rollupOptions : { } ,
20
25
} ,
21
26
} ) ;
You can’t perform that action at this time.
0 commit comments