Skip to content
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

#467 GENERATE_SOURCEMAP ENV #468

Merged
merged 1 commit into from
Dec 12, 2023
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
6 changes: 5 additions & 1 deletion configuration/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,12 @@ crypto.createHash = (algorithm) =>
crypto_orig_createHash(algorithm === "md4" ? "sha256" : algorithm);
// end hack

console.log(
process.env.GENERATE_SOURCEMAP,
typeof process.env.GENERATE_SOURCEMAP
);
// Source maps are resource heavy and can cause out of memory issue for large source files.
const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== "false";
const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP === "true";
// Some apps do not need the benefits of saving a web request, so not inlining the chunk
// makes for a smoother build process.
const shouldInlineRuntimeChunk = process.env.INLINE_RUNTIME_CHUNK !== "false";
Expand Down
4 changes: 4 additions & 0 deletions docs/pages/Setup/ENVs/ENVs.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,7 @@ If the new MAIN_MISSION ENV is set to a valid mission, skip the landing page and
#### `SKIP_CLIENT_INITIAL_LOGIN=`

If true, MMGIS will not auto-login returning users. This can be useful when login is managed someplace else. The initial login process can be manually triggered with `mmgisAPI.initialLogin()` | boolean | default `false`

#### `GENERATE_SOURCEMAP=`

If true at build-time, JavaScript source maps will also be built | boolean | default `false`
5 changes: 4 additions & 1 deletion sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,7 @@ MAIN_MISSION=

# If true, MMGIS will not auto-login returning users. This can be useful when login is managed someplace else.
# The initial login process can be manually triggered with mmgisAPI.initialLogin()
SKIP_CLIENT_INITIAL_LOGIN=
SKIP_CLIENT_INITIAL_LOGIN=

# If true at build-time, JavaScript source maps will also be built
GENERATE_SOURCEMAP=false
5 changes: 4 additions & 1 deletion src/essence/Ancillary/QueryURL.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,9 @@ var QueryURL = {
urlAppendage += '&globeZoom=' + globeZoom

//globeCamera
var orbit = L_.Globe_.litho.getCameras().orbit
const lithoCams = L_.Globe_.litho.getCameras()
if( lithoCams != null ) {
var orbit = lithoCams.orbit
var cam = orbit.camera
var con = orbit.controls

Expand All @@ -337,6 +339,7 @@ var QueryURL = {
',' +
tar.z
urlAppendage += '&globeCamera=' + globeCamera
}

//panePercents
var pP = L_.UserInterface_.getPanelPercents()
Expand Down