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 11{
22 "name" : " @firebase/firestore-exp" ,
33 "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" ,
55 "main-esm" : " ../dist/exp/index.node.esm2017.js" ,
66 "module" : " ../dist/exp/index.browser.esm2017.js" ,
77 "browser" : " ../dist/exp/index.browser.esm2017.js" ,
88 "react-native" : " ../dist/exp/index.rn.esm2017.js" ,
9+ "esm5" : " ../dist/exp/index.browser.esm5.js" ,
910 "typings" : " ../dist/exp/index.d.ts" ,
1011 "private" : true
1112}
Original file line number Diff line number Diff line change 11{
22 "name" : " @firebase/firestore-lite" ,
33 "description" : " A lite version of the Firestore SDK" ,
4- "main" : " ../dist/lite/index.node.umd .js" ,
4+ "main" : " ../dist/lite/index.node.cjs .js" ,
55 "main-esm" : " ../dist/lite/index.node.esm2017.js" ,
66 "module" : " ../dist/lite/index.browser.esm2017.js" ,
77 "browser" : " ../dist/lite/index.browser.esm2017.js" ,
88 "react-native" : " ../dist/lite/index.rn.esm2017.js" ,
9+ "esm5" : " ../dist/lite/index.browser.esm5.js" ,
910 "typings" : " ../dist/lite/index.d.ts" ,
1011 "private" : true
1112}
Original file line number Diff line number Diff line change @@ -97,13 +97,12 @@ const allBuilds = [
9797 } ,
9898 onwarn : util . onwarn
9999 } ,
100- // Node UMD build
100+ // Node CJS build
101101 {
102102 input : path . resolve ( './exp' , pkg [ 'main-esm' ] ) ,
103103 output : {
104104 file : path . resolve ( './exp' , pkg . main ) ,
105- format : 'umd' ,
106- name : 'firebase.firestore' ,
105+ format : 'cjs' ,
107106 sourcemap : true
108107 } ,
109108 plugins : util . es2017ToEs5Plugins ( /* mangled= */ false ) ,
@@ -126,6 +125,22 @@ const allBuilds = [
126125 moduleSideEffects : false
127126 }
128127 } ,
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+ } ,
129144 // RN build
130145 {
131146 input : './exp/index.rn.ts' ,
Original file line number Diff line number Diff line change @@ -96,13 +96,12 @@ const allBuilds = [
9696 } ,
9797 onwarn : util . onwarn
9898 } ,
99- // Node UMD build
99+ // Node CJS build
100100 {
101101 input : path . resolve ( './lite' , pkg [ 'main-esm' ] ) ,
102102 output : {
103103 file : path . resolve ( './lite' , pkg . main ) ,
104- format : 'umd' ,
105- name : 'firebase.firestore' ,
104+ format : 'cjs' ,
106105 sourcemap : true
107106 } ,
108107 plugins : [
@@ -139,6 +138,22 @@ const allBuilds = [
139138 moduleSideEffects : false
140139 }
141140 } ,
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+ } ,
142157 // RN build
143158 {
144159 input : './lite/index.ts' ,
You can’t perform that action at this time.
0 commit comments