Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

chore: load local reearth-config.json for debugging #119

Merged
merged 2 commits into from
Nov 8, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ __screenshots__
/cypress/videos
/cypress/screenshots
/.env*
/reearth-config.json
9 changes: 9 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ const webpack = require("webpack");

const pkg = require("./package.json");

let reearthConfig = {};
try {
// eslint-disable-next-line node/no-missing-require
reearthConfig = require("./reearth-config.json");
} catch {
// ignore
}

module.exports = (env, args = {}) => {
const isProd = args.mode === "production";
const envfile = loadEnv(Object.keys(env || {}).find(k => !k.startsWith("WEBPACK_")));
Expand All @@ -28,6 +36,7 @@ module.exports = (env, args = {}) => {
...process.env,
},
}),
...reearthConfig,
};

return {
Expand Down