diff --git a/build/lib/optimize.js b/build/lib/optimize.js index dee90b3d32..dfc644dfed 100644 --- a/build/lib/optimize.js +++ b/build/lib/optimize.js @@ -199,7 +199,13 @@ function minifyTask(src, sourceMapBaseUrl) { f.sourceMap = JSON.parse(sourceMapFile.text); cb(undefined, f); }, cb); - }), jsFilter.restore, cssFilter, postcss([cssnano({ preset: 'default' })]), cssFilter.restore, svgFilter, svgmin(), svgFilter.restore, sourcemaps.mapSources((sourcePath) => { + }), jsFilter.restore, cssFilter, postcss([cssnano({ preset: 'default' })]), cssFilter.restore, svgFilter, + // {{SQL CARBON EDIT}} - Disable the removeViewBox option because some SVG files ADS needs will not scale properly when the view box information is removed. + svgmin({ + plugins: [ + { removeViewBox: false } + ] + }), svgFilter.restore, sourcemaps.mapSources((sourcePath) => { if (sourcePath === 'bootstrap-fork.js') { return 'bootstrap-fork.orig.js'; } diff --git a/build/lib/optimize.ts b/build/lib/optimize.ts index 0451450af4..cfda628c34 100644 --- a/build/lib/optimize.ts +++ b/build/lib/optimize.ts @@ -288,7 +288,12 @@ export function minifyTask(src: string, sourceMapBaseUrl?: string): (cb: any) => postcss([cssnano({ preset: 'default' })]), cssFilter.restore, svgFilter, - svgmin(), + // {{SQL CARBON EDIT}} - Disable the removeViewBox option because some SVG files ADS needs will not scale properly when the view box information is removed. + svgmin({ + plugins: [ + { removeViewBox: false } + ] + }), svgFilter.restore, (sourcemaps).mapSources((sourcePath: string) => { if (sourcePath === 'bootstrap-fork.js') {