# Build:w clears fonts/images

**URL:** <https://forum.litium.com/t/build-w-clears-fonts-images/1655>\
**Category:** Questions\
**Tags:** accelerator, litium-7\
**Created:** [September 17, 2020, 3:24pm UTC](https://forum.litium.com/t/build-w-clears-fonts-images/1655 "2020-09-17T15:24:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Simon.Halling](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@Simon.Halling](https://forum.litium.com/u/Simon.Halling)\
**Post date:** [September 17, 2020, 3:24pm UTC](https://forum.litium.com/t/build-w-clears-fonts-images/1655/1 "2020-09-17T15:24:20Z")

</div>

Hi!

I got an accelerator project installed and trying to setup the fonts for the project.  
When i run the build:w script I get all fonts generated from the "/client/fonts/ to the output folder /ui/fonts/…woff2 etc.  
But once I save anything that triggers the watch, all the fonts gets deleted in the UI folder.

Is there anything i can modify to make fonts stay in the ui/fonts folder?

Thanks 🙂

Added in webpack.config.common:  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/3acd9cede3ebb880963e54c81a653e52660ffc7c.png)

Litium version: 7.4.2

---

<div class="post-metadata">

**Author:** ![ton.nguyen](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/ton.nguyen/32/989_2.png) [@ton.nguyen](https://forum.litium.com/u/ton.nguyen)\
**Post date:** [September 17, 2020, 5:19pm UTC](https://forum.litium.com/t/build-w-clears-fonts-images/1655/2 "2020-09-17T17:19:05Z")

</div>

Have you added the font in your css? Check webpack’s document for more info [https://webpack.js.org/guides/asset-management/#loading-fonts](https://webpack.js.org/guides/asset-management/#loading-fonts)

---

<div class="post-metadata">

**Author:** ![Simon.Halling](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@Simon.Halling](https://forum.litium.com/u/Simon.Halling)\
**Post date:** [September 18, 2020, 6:10am UTC](https://forum.litium.com/t/build-w-clears-fonts-images/1655/3 "2020-09-18T06:10:15Z")

</div>

Yeah, i’ve added @fontface and the src of the font.  
I get the font to appear after the build, but after the watch-job is done » the fonts gets removed.

---

<div class="post-metadata">

**Author:** ![ton.nguyen](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/ton.nguyen/32/989_2.png) [@ton.nguyen](https://forum.litium.com/u/ton.nguyen)\
**Post date:** [September 18, 2020, 10:33am UTC](https://forum.litium.com/t/build-w-clears-fonts-images/1655/4 "2020-09-18T10:33:08Z")

</div>

This guy seems to have the same issue, can you try it out? [https://stackoverflow.com/questions/61887971/webpack-watch-mode-not-working-with-html-webpack-clean-webpack-plugins](https://stackoverflow.com/questions/61887971/webpack-watch-mode-not-working-with-html-webpack-clean-webpack-plugins)

---

<div class="post-metadata">

**Author:** ![Simon.Halling](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@Simon.Halling](https://forum.litium.com/u/Simon.Halling)\
**Post date:** [September 18, 2020, 12:00pm UTC](https://forum.litium.com/t/build-w-clears-fonts-images/1655/5 "2020-09-18T12:00:08Z")

</div>

Thanks, that did the job. Added the option : cleanStaleWebpackAssets:false to the CleanWebpackPlugin

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/12eddac3b8b661de1db86af10ac8151b571e6fb9.png) [@system](https://forum.litium.com/u/system)\
**Post date:** [October 16, 2020, 12:00pm UTC](https://forum.litium.com/t/build-w-clears-fonts-images/1655/6 "2020-10-16T12:00:08Z")

</div>

Closed on October 16, 2020, 12:00pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
