Skip to content

Commit

Permalink
fix: added fix for SVG rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
JanssenBrm committed Jan 13, 2025
1 parent 8cc5752 commit dd30e83
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 2 deletions.
4 changes: 2 additions & 2 deletions themes/apex/src/theme/components/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
top: 50%;
right: 0;
transform: translateY(-50%);
background-image: url('@/../public/assets/img/icons/icon-caret-down-blue.svg');
background-image: url('@/theme/assets/img/icons/icon-caret-down-blue.svg');
background-repeat: no-repeat;
background-position: center center;
background-size: contain;
Expand Down Expand Up @@ -216,5 +216,5 @@
width: 14px;
height: 10px;
background-repeat: no-repeat;
background-image: url('@/../public/assets/img/icons/arrow_right_alt.svg');
background-image: url('@/theme/assets/img/icons/arrow_right_alt.svg');
}
71 changes: 71 additions & 0 deletions themes/apex/vue.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
const yargs = require('yargs/yargs');
const { hideBin } = require('yargs/helpers');
const path = require('path');
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');

const { properties } = require('./config.schema.json');
const pkgFile = require('./package.json');

const optionsForType = (type) => Object.entries(properties)
.filter(([_, schema]) => Array.isArray(schema.type) && schema.type.includes(type))
.map(([key]) => key);
const argv = yargs(hideBin(process.argv))
.parserConfiguration({'camel-case-expansion': false})
.env('SB')
.boolean(optionsForType("boolean"))
.number(optionsForType("number").concat(optionsForType("integer")))
.array(optionsForType("array"))
.option(
Object.fromEntries(
optionsForType("object").map((k) => [k, { coerce: JSON.parse }])
)
)
.argv;
// Clean-up arguments
delete argv._;
delete argv.$0;

const configFile = path.resolve(argv.CONFIG ? argv.CONFIG : './config.js');
const configFromFile = require(configFile);
const mergedConfig = Object.assign(configFromFile, argv);

const vueConfig = {
lintOnSave: process.env.NODE_ENV !== 'production',
productionSourceMap: !mergedConfig.noSourceMaps,
publicPath: mergedConfig.pathPrefix,
chainWebpack: webpackConfig => {
webpackConfig.plugin('define').tap(args => {
args[0].STAC_BROWSER_VERSION = JSON.stringify(pkgFile.version);
args[0].CONFIG_PATH = JSON.stringify(configFile);
args[0].CONFIG_CLI = JSON.stringify(argv);
return args;
});

webpackConfig.plugin('html').tap(args => {
args[0].title = mergedConfig.catalogTitle;
args[0].url = mergedConfig.catalogUrl;
return args;
});
},
configureWebpack: {
resolve: {
fallback: {
'fs/promises': false
}
},
plugins: [
new NodePolyfillPlugin({
includeAliases: ['Buffer', 'path']
})
]
},
pluginOptions: {
i18n: {
locale: mergedConfig.locale,
fallbackLocale: mergedConfig.fallbackLocale,
enableInSFC: false
}
}
};

module.exports = vueConfig;

0 comments on commit dd30e83

Please sign in to comment.