set svgmin option (#20923)

* disable removeViewBox option

* add comment
This commit is contained in:
Alan Ren
2022-10-21 21:20:51 -07:00
committed by GitHub
parent 97c070be13
commit 3e1f2b0d9d
2 changed files with 13 additions and 2 deletions

View File

@@ -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,
(<any>sourcemaps).mapSources((sourcePath: string) => {
if (sourcePath === 'bootstrap-fork.js') {