Build:w clears fonts/images

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 :slight_smile:

Added in webpack.config.common:
image

Litium version: 7.4.2

1 Like

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

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.

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

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

1 Like

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