diff --git a/frontend/webpack/config.dev.js b/frontend/webpack/config.dev.js index e24ce819c..9e7377768 100644 --- a/frontend/webpack/config.dev.js +++ b/frontend/webpack/config.dev.js @@ -2,6 +2,7 @@ const { resolve } = require("path"); const { merge } = require("webpack-merge"); const BASE_CONFIG = require("./config.base"); const ExtraWatchWebpackPlugin = require("extra-watch-webpack-plugin"); +const fs = require("fs"); /** @type { import('webpack').Configuration } */ const DEV_CONFIG = { @@ -24,4 +25,9 @@ const DEV_CONFIG = { ], }; +if (!fs.existsSync(resolve(__dirname, "../src/constants/firebase-config.ts"))) { + const msg = `File firebase-config.ts is missing! Please duplicate firebase-config-example.ts and rename it to firebase-config.ts. If you are using Firebase, fill in the values in the config file. If not, you can leave the fields blank.`; + throw new Error(msg); +} + module.exports = merge(BASE_CONFIG, DEV_CONFIG);