diff --git a/e2e/karma.conf.js b/e2e/karma.conf.js index cfab2e22903..84a81e303bb 100644 --- a/e2e/karma.conf.js +++ b/e2e/karma.conf.js @@ -58,7 +58,8 @@ module.exports = function (config) { directories: ['./node_modules'], alias: { '@firebase/messaging/sw': - 'node_modules/@firebase/messaging/dist/index.sw.esm2017.js' + 'node_modules/@firebase/messaging/dist/index.sw.esm2017.js', + 'idb': 'node_modules/idb/build/index.js' } }, transforms: [ @@ -77,7 +78,14 @@ module.exports = function (config) { ] }, compilerOptions: { - allowJs: true + allowJs: true, + 'module': 'commonjs', + 'moduleResolution': 'node', + 'resolveJsonModule': true, + 'esModuleInterop': true, + 'sourceMap': true, + 'target': 'es5', + 'importHelpers': true } }, plugins: [ diff --git a/e2e/sample-apps/modular.js b/e2e/sample-apps/modular.js index 04c6d95af21..cf08ca53d9d 100644 --- a/e2e/sample-apps/modular.js +++ b/e2e/sample-apps/modular.js @@ -23,7 +23,11 @@ import { logEvent } from 'firebase/analytics'; import { initializeAppCheck, CustomProvider } from 'firebase/app-check'; -import { getFunctions, httpsCallable } from 'firebase/functions'; +import { + getFunctions, + httpsCallable, + httpsCallableFromURL +} from 'firebase/functions'; import { getStorage, ref, @@ -133,7 +137,7 @@ async function callFunctions(app) { throw e; } } - callTest = httpsCallableByUrl( + callTest = httpsCallableFromURL( functions, `https://us-central-${app.options.projectId}.cloudfunctions.net/callTest` ); diff --git a/e2e/webpack.config.js b/e2e/webpack.config.js index f0ef1fa7d02..38e56dd041b 100644 --- a/e2e/webpack.config.js +++ b/e2e/webpack.config.js @@ -57,7 +57,7 @@ module.exports = [ }, devtool: 'source-map', devServer: { - contentBase: './build' + static: './build' } }, { @@ -96,7 +96,7 @@ module.exports = [ }, devtool: 'source-map', devServer: { - contentBase: './build' + static: './build' } } ];