Skip to content

Commit 173089b

Browse files
committed
Setting several building option to boolean/numerical/null value has unintended effect #227
1 parent 8b02e44 commit 173089b

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

src/store/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,9 @@ function getStore(config) {
377377
state[key] = value;
378378
}
379379
break;
380+
case 'crossOriginMedia':
381+
state.crossOriginMedia = ['anonymous', 'use-credentials'].includes(value) ? value : null;
382+
break;
380383
default:
381384
state[key] = value;
382385
}

vue.config.js

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
const yargs = require('yargs/yargs');
22
const { hideBin } = require('yargs/helpers');
3-
const argv = yargs(hideBin(process.argv)).argv;
3+
const argv = yargs(hideBin(process.argv))
4+
.parserConfiguration({'camel-case-expansion': false})
5+
.boolean([
6+
'allowExternalAccess',
7+
'displayGeoTiffByDefault',
8+
'redirectLegacyUrls',
9+
'showThumbnailsAsAssets',
10+
'stacLint',
11+
'useTileLayerAsFallback'
12+
])
13+
.number([
14+
'itemsPerPage',
15+
'maxPreviewsOnMap'
16+
])
17+
.argv;
418
// Clean-up arguments
519
delete argv._;
620
delete argv.$0;

0 commit comments

Comments
 (0)