File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @nbw/song" ,
3
- "main" : " dist/index.js" ,
4
- "module" : " dist/index.js" ,
3
+ "main" : " dist/index.node. js" ,
4
+ "module" : " dist/index.node. js" ,
5
5
"types" : " dist/index.d.ts" ,
6
6
"type" : " module" ,
7
7
"private" : true ,
8
8
"exports" : {
9
9
"." : {
10
- "import" : " ./dist/index.js" ,
10
+ "browser" : " ./dist/index.browser.js" ,
11
+ "node" : " ./dist/index.node.js" ,
12
+ "import" : " ./dist/index.node.js" ,
11
13
"types" : " ./dist/index.d.ts" ,
12
14
"development" : " ./src/index.ts"
13
15
}
14
16
},
15
17
"scripts" : {
16
- "build" : " bun run clean && bun build src/index.ts --outdir dist --target node && bun run build:types" ,
18
+ "build" : " bun run clean && bun run build:node && bun run build:browser && bun run build:types" ,
19
+ "build:node" : " bun build src/index.ts --outdir dist --target node && mv dist/index.js dist/index.node.js" ,
20
+ "build:browser" : " bun build src/index.ts --outdir dist --target browser && mv dist/index.js dist/index.browser.js" ,
17
21
"build:types" : " tsc --project tsconfig.build.json" ,
18
22
"clean" : " rm -rf dist" ,
19
23
"dev" : " bun build src/index.ts --outdir dist --target node --watch" ,
You can’t perform that action at this time.
0 commit comments