mirror of
https://github.com/hanzoai/firebase-js-sdk.git
synced 2026-09-24 16:59:10 +00:00
Added es5 builds for firestore v9 and firestore lite (#4905)
* make esm5 builds for firestore * build cjs for node * mangle es5 again
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "@firebase/firestore-exp",
|
||||
"description": "A tree-shakeable version of the Firestore SDK",
|
||||
"main": "../dist/exp/index.node.umd.js",
|
||||
"main": "../dist/exp/index.node.cjs.js",
|
||||
"main-esm": "../dist/exp/index.node.esm2017.js",
|
||||
"module": "../dist/exp/index.browser.esm2017.js",
|
||||
"browser": "../dist/exp/index.browser.esm2017.js",
|
||||
"react-native": "../dist/exp/index.rn.esm2017.js",
|
||||
"esm5": "../dist/exp/index.browser.esm5.js",
|
||||
"typings": "../dist/exp/index.d.ts",
|
||||
"private": true
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "@firebase/firestore-lite",
|
||||
"description": "A lite version of the Firestore SDK",
|
||||
"main": "../dist/lite/index.node.umd.js",
|
||||
"main": "../dist/lite/index.node.cjs.js",
|
||||
"main-esm": "../dist/lite/index.node.esm2017.js",
|
||||
"module": "../dist/lite/index.browser.esm2017.js",
|
||||
"browser": "../dist/lite/index.browser.esm2017.js",
|
||||
"react-native": "../dist/lite/index.rn.esm2017.js",
|
||||
"esm5": "../dist/lite/index.browser.esm5.js",
|
||||
"typings": "../dist/lite/index.d.ts",
|
||||
"private": true
|
||||
}
|
||||
|
||||
@@ -97,13 +97,12 @@ const allBuilds = [
|
||||
},
|
||||
onwarn: util.onwarn
|
||||
},
|
||||
// Node UMD build
|
||||
// Node CJS build
|
||||
{
|
||||
input: path.resolve('./exp', pkg['main-esm']),
|
||||
output: {
|
||||
file: path.resolve('./exp', pkg.main),
|
||||
format: 'umd',
|
||||
name: 'firebase.firestore',
|
||||
format: 'cjs',
|
||||
sourcemap: true
|
||||
},
|
||||
plugins: util.es2017ToEs5Plugins(/* mangled= */ false),
|
||||
@@ -126,6 +125,22 @@ const allBuilds = [
|
||||
moduleSideEffects: false
|
||||
}
|
||||
},
|
||||
// Convert es2017 build to ES5
|
||||
{
|
||||
input: path.resolve('./exp', pkg['browser']),
|
||||
output: [
|
||||
{
|
||||
file: path.resolve('./exp', pkg['esm5']),
|
||||
format: 'es',
|
||||
sourcemap: true
|
||||
}
|
||||
],
|
||||
plugins: util.es2017ToEs5Plugins(/* mangled= */ true),
|
||||
external: util.resolveBrowserExterns,
|
||||
treeshake: {
|
||||
moduleSideEffects: false
|
||||
}
|
||||
},
|
||||
// RN build
|
||||
{
|
||||
input: './exp/index.rn.ts',
|
||||
|
||||
@@ -96,13 +96,12 @@ const allBuilds = [
|
||||
},
|
||||
onwarn: util.onwarn
|
||||
},
|
||||
// Node UMD build
|
||||
// Node CJS build
|
||||
{
|
||||
input: path.resolve('./lite', pkg['main-esm']),
|
||||
output: {
|
||||
file: path.resolve('./lite', pkg.main),
|
||||
format: 'umd',
|
||||
name: 'firebase.firestore',
|
||||
format: 'cjs',
|
||||
sourcemap: true
|
||||
},
|
||||
plugins: [
|
||||
@@ -139,6 +138,22 @@ const allBuilds = [
|
||||
moduleSideEffects: false
|
||||
}
|
||||
},
|
||||
// Convert es2017 build to ES5
|
||||
{
|
||||
input: path.resolve('./lite', pkg.browser),
|
||||
output: [
|
||||
{
|
||||
file: path.resolve('./lite', pkg.esm5),
|
||||
format: 'es',
|
||||
sourcemap: true
|
||||
}
|
||||
],
|
||||
plugins: util.es2017ToEs5Plugins(/* mangled= */ true),
|
||||
external: util.resolveBrowserExterns,
|
||||
treeshake: {
|
||||
moduleSideEffects: false
|
||||
}
|
||||
},
|
||||
// RN build
|
||||
{
|
||||
input: './lite/index.ts',
|
||||
|
||||
Reference in New Issue
Block a user