Skip to content

Commit

Permalink
Enable JS minifier compatibility options
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrotherham committed Dec 23, 2022
1 parent d937d37 commit 2eeebd2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tasks/compile-javascripts.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ export async function compileJavaScript ([modulePath, { srcPath, destPath, minif
*/
export function minifyJavaScript (modulePath, result) {
const minified = minify({ [modulePath]: result.code }, {
ie8: true,
warnings: true,

// Include source maps
Expand All @@ -106,7 +105,13 @@ export function minifyJavaScript (modulePath, result) {
filename: result.map.file,
url: `${result.map.file}.map`,
includeSources: true
}
},

// Compatibility workarounds
ie8: true,
module: false,
v8: true,
webkit: true
})

if (minified.warnings) {
Expand Down

0 comments on commit 2eeebd2

Please sign in to comment.