Skip to content

Make Firestore-mangled build the only Firestore build #2640

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion integration/firestore/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function copyTests() {
const firebaseAppSdk = 'firebase/app/dist/index.esm.js';
const firebaseFirestoreSdk = resolve(
__dirname,
'../../packages/firestore/dist/index.esm.min.js'
'../../packages/firestore/dist/index.esm.js'
);
return gulp
.src(
Expand Down
18 changes: 0 additions & 18 deletions packages/firebase/firestore/index.min.ts

This file was deleted.

14 changes: 1 addition & 13 deletions packages/firebase/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,6 @@ const componentBuilds = pkg.components
})
.reduce((a, b) => a.concat(b), []);

const firestoreMinifiedBuild = {
input: `firestore/index.min.ts`,
output: createUmdOutputConfig(`firebase-firestore.min.js`),
plugins: [...plugins, uglify()],
external: ['@firebase/app']
};

/**
* Complete Package Builds
*/
Expand Down Expand Up @@ -267,9 +260,4 @@ const completeBuilds = [
}
];

export default [
...appBuilds,
...componentBuilds,
firestoreMinifiedBuild,
...completeBuilds
];
export default [...appBuilds, ...componentBuilds, ...completeBuilds];
1 change: 1 addition & 0 deletions packages/firestore/externs.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"externs" : [
"node_modules/@types/node/base.d.ts",
"node_modules/typescript/lib/lib.es5.d.ts",
"node_modules/typescript/lib/lib.dom.d.ts",
"node_modules/typescript/lib/lib.es2015.promise.d.ts",
Expand Down
3 changes: 0 additions & 3 deletions packages/firestore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,8 @@
},
"main": "dist/index.node.cjs.js",
"browser": "dist/index.cjs.js",
"browserMinified": "dist/index.cjs.min.js",
"module": "dist/index.esm.js",
"moduleMinified": "dist/index.esm.min.js",
"esm2017": "dist/index.esm2017.js",
"esm2017Minified": "dist/index.esm2017.min.js",
"license": "Apache-2.0",
"files": [
"dist"
Expand Down
40 changes: 0 additions & 40 deletions packages/firestore/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,6 @@ const terserOptions = {
* ES5 Builds
*/
const es5BuildPlugins = [
typescriptPlugin({
typescript,
cacheRoot: './.cache/es5/'
}),
json()
];

const es5MinifiedBuildPlugins = [
typescriptPlugin({
typescript,
transformers,
Expand Down Expand Up @@ -114,35 +106,13 @@ const es5Builds = [
],
plugins: es5BuildPlugins,
external: id => deps.some(dep => id === dep || id.startsWith(`${dep}/`))
},
{
input: 'index.ts',
output: [
{ file: pkg.browserMinified, format: 'cjs', sourcemap: true },
{ file: pkg.moduleMinified, format: 'es', sourcemap: true }
],
plugins: es5MinifiedBuildPlugins,
external: id => deps.some(dep => id === dep || id.startsWith(`${dep}/`))
}
];

/**
* ES2017 Builds
*/
const es2017BuildPlugins = [
typescriptPlugin({
typescript,
tsconfigOverride: {
compilerOptions: {
target: 'es2017'
}
},
cacheRoot: './.cache/es2017/'
}),
json({ preferConst: true })
];

const es2017MinifiedBuildPlugins = [
typescriptPlugin({
typescript,
tsconfigOverride: {
Expand Down Expand Up @@ -170,16 +140,6 @@ const es2017Builds = [
},
plugins: es2017BuildPlugins,
external: id => deps.some(dep => id === dep || id.startsWith(`${dep}/`))
},
{
input: 'index.ts',
output: {
file: pkg.esm2017Minified,
format: 'es',
sourcemap: true
},
plugins: es2017MinifiedBuildPlugins,
external: id => deps.some(dep => id === dep || id.startsWith(`${dep}/`))
}
];

Expand Down