File tree Expand file tree Collapse file tree 4 files changed +40
-8
lines changed Expand file tree Collapse file tree 4 files changed +40
-8
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @firebase/firestore-exp" ,
3
3
"description" : " A tree-shakeable version of the Firestore SDK" ,
4
- "main" : " ../dist/exp/index.node.umd .js" ,
4
+ "main" : " ../dist/exp/index.node.cjs .js" ,
5
5
"main-esm" : " ../dist/exp/index.node.esm2017.js" ,
6
6
"module" : " ../dist/exp/index.browser.esm2017.js" ,
7
7
"browser" : " ../dist/exp/index.browser.esm2017.js" ,
8
8
"react-native" : " ../dist/exp/index.rn.esm2017.js" ,
9
+ "esm5" : " ../dist/exp/index.browser.esm5.js" ,
9
10
"typings" : " ../dist/exp/index.d.ts" ,
10
11
"private" : true
11
12
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @firebase/firestore-lite" ,
3
3
"description" : " A lite version of the Firestore SDK" ,
4
- "main" : " ../dist/lite/index.node.umd .js" ,
4
+ "main" : " ../dist/lite/index.node.cjs .js" ,
5
5
"main-esm" : " ../dist/lite/index.node.esm2017.js" ,
6
6
"module" : " ../dist/lite/index.browser.esm2017.js" ,
7
7
"browser" : " ../dist/lite/index.browser.esm2017.js" ,
8
8
"react-native" : " ../dist/lite/index.rn.esm2017.js" ,
9
+ "esm5" : " ../dist/lite/index.browser.esm5.js" ,
9
10
"typings" : " ../dist/lite/index.d.ts" ,
10
11
"private" : true
11
12
}
Original file line number Diff line number Diff line change @@ -97,13 +97,12 @@ const allBuilds = [
97
97
} ,
98
98
onwarn : util . onwarn
99
99
} ,
100
- // Node UMD build
100
+ // Node CJS build
101
101
{
102
102
input : path . resolve ( './exp' , pkg [ 'main-esm' ] ) ,
103
103
output : {
104
104
file : path . resolve ( './exp' , pkg . main ) ,
105
- format : 'umd' ,
106
- name : 'firebase.firestore' ,
105
+ format : 'cjs' ,
107
106
sourcemap : true
108
107
} ,
109
108
plugins : util . es2017ToEs5Plugins ( /* mangled= */ false ) ,
@@ -126,6 +125,22 @@ const allBuilds = [
126
125
moduleSideEffects : false
127
126
}
128
127
} ,
128
+ // Convert es2017 build to ES5
129
+ {
130
+ input : path . resolve ( './exp' , pkg [ 'browser' ] ) ,
131
+ output : [
132
+ {
133
+ file : path . resolve ( './exp' , pkg [ 'esm5' ] ) ,
134
+ format : 'es' ,
135
+ sourcemap : true
136
+ }
137
+ ] ,
138
+ plugins : util . es2017ToEs5Plugins ( /* mangled= */ true ) ,
139
+ external : util . resolveBrowserExterns ,
140
+ treeshake : {
141
+ moduleSideEffects : false
142
+ }
143
+ } ,
129
144
// RN build
130
145
{
131
146
input : './exp/index.rn.ts' ,
Original file line number Diff line number Diff line change @@ -96,13 +96,12 @@ const allBuilds = [
96
96
} ,
97
97
onwarn : util . onwarn
98
98
} ,
99
- // Node UMD build
99
+ // Node CJS build
100
100
{
101
101
input : path . resolve ( './lite' , pkg [ 'main-esm' ] ) ,
102
102
output : {
103
103
file : path . resolve ( './lite' , pkg . main ) ,
104
- format : 'umd' ,
105
- name : 'firebase.firestore' ,
104
+ format : 'cjs' ,
106
105
sourcemap : true
107
106
} ,
108
107
plugins : [
@@ -139,6 +138,22 @@ const allBuilds = [
139
138
moduleSideEffects : false
140
139
}
141
140
} ,
141
+ // Convert es2017 build to ES5
142
+ {
143
+ input : path . resolve ( './lite' , pkg . browser ) ,
144
+ output : [
145
+ {
146
+ file : path . resolve ( './lite' , pkg . esm5 ) ,
147
+ format : 'es' ,
148
+ sourcemap : true
149
+ }
150
+ ] ,
151
+ plugins : util . es2017ToEs5Plugins ( /* mangled= */ true ) ,
152
+ external : util . resolveBrowserExterns ,
153
+ treeshake : {
154
+ moduleSideEffects : false
155
+ }
156
+ } ,
142
157
// RN build
143
158
{
144
159
input : './lite/index.ts' ,
You can’t perform that action at this time.
0 commit comments