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

Commit

Permalink
chore: load local reearth-config.json for debugging (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
rot1024 authored Nov 8, 2021
1 parent f16706a commit 6115ee4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
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

0 comments on commit 6115ee4

Please sign in to comment.