Skip to content

Commit

Permalink
Add remove WOFF1 script and use in es6 build
Browse files Browse the repository at this point in the history
Any browser that supports ES6 also support WOFF2, so we can further reduce
distribution size by removing the WOFF1 copies of fonts.
  • Loading branch information
wilbowma authored and johannesjo committed May 13, 2021
1 parent 8e9e7ae commit 2cd7a1a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
"start": "yarn electron:build && cross-env NODE_ENV=DEV electron .",
"startFrontend": "ng serve",
"serveProd": "ng serve --prod",
"buildFrontend:prod:es6": "cross-env BROWSERSLIST_ENV='modern' ng build --prod",
"removeWOFF1": "find dist/ -type f -iname '*.woff' -delete && find dist/ -type f -iname '*.css' -exec sed -i \"s/, url\\('.*'\\) format\\('woff'\\)//g\" {} \\;",
"buildFrontend:prod:es6": "cross-env BROWSERSLIST_ENV='modern' ng build --prod && yarn removeWOFF1",
"buildFrontend:prod": "ng build --prod",
"buildFrontend:prodWeb": "ng build --prod --configuration productionWeb",
"buildFrontend:stage": "ng build --prod --configuration stage",
Expand Down

0 comments on commit 2cd7a1a

Please sign in to comment.