File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change 3838
3939``` jsonc
4040{
41- " name" : " foo" , // your package name
41+ " name" : " foo" , // your package name
4242 " type" : " module" ,
43- " source" : " src/foo.js" , // your source code
44- " exports" : " ./dist/foo.modern.js" , // where to generate the modern bundle (see below)
45- " main" : " ./dist/foo.cjs" , // where to generate the CommonJS bundle
46- " module" : " ./dist/foo.module.js" , // where to generate the ESM bundle
47- " unpkg" : " ./dist/foo.umd.js" , // where to generate the UMD bundle (also aliased as "umd:main")
43+ " source" : " src/foo.js" , // your source code
44+ " exports" : {
45+ " require" : " ./dist/foo.cjs" , // used for require() in Node 12+
46+ " default" : " ./dist/foo.modern.js" // where to generate the modern bundle (see below)
47+ },
48+ " main" : " ./dist/foo.cjs" , // where to generate the CommonJS bundle
49+ " module" : " ./dist/foo.module.js" , // where to generate the ESM bundle
50+ " unpkg" : " ./dist/foo.umd.js" , // where to generate the UMD bundle (also aliased as "umd:main")
4851 " scripts" : {
49- " build" : " microbundle" , // compiles "source" to "main"/"module"/"unpkg"
50- " dev" : " microbundle watch" // re-build when source files change
52+ " build" : " microbundle" , // compiles "source" to "main"/"module"/"unpkg"
53+ " dev" : " microbundle watch" // re-build when source files change
5154 }
5255}
5356```
You can’t perform that action at this time.
0 commit comments