File tree 4 files changed +19
-18
lines changed
4 files changed +19
-18
lines changed Original file line number Diff line number Diff line change 4
4
"description" : " " ,
5
5
"author" :
" Firebase <[email protected] > (https://firebase.google.com/)" ,
6
6
"main" : " dist/index.cjs.js" ,
7
- "browser" : " dist/index.esm2017.js" ,
8
- "module" : " dist/index.esm2017.js" ,
7
+ "browser" : " dist/esm/ index.esm2017.js" ,
8
+ "module" : " dist/esm/ index.esm2017.js" ,
9
9
"exports" : {
10
10
"." : {
11
11
"types" : " ./dist/src/index.d.ts" ,
12
12
"node" : {
13
13
"require" : " ./dist/index.cjs.js" ,
14
- "import" : " ./dist/index.esm2017.js"
14
+ "import" : " ./dist/esm/ index.esm2017.js"
15
15
},
16
16
"browser" : {
17
17
"require" : " ./dist/index.cjs.js" ,
18
- "import" : " ./dist/index.esm2017.js"
18
+ "import" : " ./dist/esm/ index.esm2017.js"
19
19
},
20
- "default" : " ./dist/index.esm2017.js"
20
+ "default" : " ./dist/esm/ index.esm2017.js"
21
21
},
22
22
"./package.json" : " ./package.json"
23
23
},
Original file line number Diff line number Diff line change @@ -32,21 +32,21 @@ const buildPlugins = [
32
32
json ( { preferConst : true } )
33
33
] ;
34
34
35
- const browserBuilds = [
35
+ const builds = [
36
36
{
37
37
input : 'src/index.ts' ,
38
38
output : {
39
39
file : pkg . browser ,
40
40
format : 'es' ,
41
41
sourcemap : true
42
42
} ,
43
- plugins : buildPlugins ,
43
+ plugins : [ ... buildPlugins , emitModulePackageFile ( ) ] ,
44
44
external : id => deps . some ( dep => id === dep || id . startsWith ( `${ dep } /` ) )
45
45
} ,
46
46
{
47
47
input : 'src/index.ts' ,
48
48
output : {
49
- file : './dist/index.cjs.js' ,
49
+ file : pkg . main ,
50
50
format : 'cjs' ,
51
51
sourcemap : true
52
52
} ,
@@ -55,4 +55,4 @@ const browserBuilds = [
55
55
}
56
56
] ;
57
57
58
- export default [ ... browserBuilds ] ;
58
+ export default builds ;
Original file line number Diff line number Diff line change 4
4
"description" : " " ,
5
5
"author" :
" Firebase <[email protected] > (https://firebase.google.com/)" ,
6
6
"main" : " dist/index.cjs.js" ,
7
- "browser" : " dist/index.esm2017.js" ,
8
- "module" : " dist/index.esm2017.js" ,
7
+ "browser" : " dist/esm/ index.esm2017.js" ,
8
+ "module" : " dist/esm/ index.esm2017.js" ,
9
9
"exports" : {
10
10
"." : {
11
11
"types" : " ./dist/functions-public.d.ts" ,
12
12
"node" : {
13
- "import" : " ./dist/index.esm2017.js" ,
13
+ "import" : " ./dist/esm/ index.esm2017.js" ,
14
14
"require" : " ./dist/index.cjs.js"
15
15
},
16
16
"browser" : {
17
17
"require" : " ./dist/index.cjs.js" ,
18
- "import" : " ./dist/index.esm2017.js"
18
+ "import" : " ./dist/esm/ index.esm2017.js"
19
19
},
20
- "default" : " ./dist/index.esm2017.js"
20
+ "default" : " ./dist/esm/ index.esm2017.js"
21
21
},
22
22
"./package.json" : " ./package.json"
23
23
},
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ const buildPlugins = [
34
34
json ( { preferConst : true } )
35
35
] ;
36
36
37
- const browserBuilds = [
37
+ const builds = [
38
38
{
39
39
input : 'src/index.ts' ,
40
40
output : {
@@ -45,13 +45,14 @@ const browserBuilds = [
45
45
external : id => deps . some ( dep => id === dep || id . startsWith ( `${ dep } /` ) ) ,
46
46
plugins : [
47
47
...buildPlugins ,
48
- replace ( generateBuildTargetReplaceConfig ( 'esm' , 2017 ) )
48
+ replace ( generateBuildTargetReplaceConfig ( 'esm' , 2017 ) ) ,
49
+ emitModulePackageFile ( )
49
50
]
50
51
} ,
51
52
{
52
53
input : 'src/index.ts' ,
53
54
output : {
54
- file : './dist/index.cjs.js' ,
55
+ file : pkg . main ,
55
56
format : 'cjs' ,
56
57
sourcemap : true
57
58
} ,
@@ -63,4 +64,4 @@ const browserBuilds = [
63
64
}
64
65
] ;
65
66
66
- export default [ ... browserBuilds ] ;
67
+ export default builds ;
You can’t perform that action at this time.
0 commit comments