Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Bug with fonts during local development #6644

Closed
exocornet opened this issue May 28, 2024 · 8 comments
Closed

[Bug]: Bug with fonts during local development #6644

exocornet opened this issue May 28, 2024 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@exocornet
Copy link

System Info

fonts disappear

Details

If the font is connected via scss (css) and caching is enabled, when you change the scss or ts files where scss (css) is not connected, the fonts are deleted, which makes development difficult.

Reproduce link

No response

Reproduce Steps

image
image
image

@exocornet exocornet added bug Something isn't working pending triage The issue/PR is currently untouched. labels May 28, 2024
Copy link
Contributor

Hello @exocornet, sorry we can't investigate the problem further without reproduction demo, please provide a repro demo by forking rspack-repro, or provide a minimal GitHub repository by yourself. Issues labeled by need reproduction will be closed if no activities in 14 days.

@LingyuCoder LingyuCoder removed the pending triage The issue/PR is currently untouched. label May 29, 2024
@exocornet
Copy link
Author

Hello, I provide a repository
https://github.com/exocornet/express-template/tree/rspack

File rspack.config.js 139 line. I had to disable caching to work correctly locally, but the collector began to work slower.
https://github.com/exocornet/express-template/blob/rspack/rspack.config.js

I connect the fonts in fonts.scss
https://github.com/exocornet/express-template/blob/rspack/src/shared/styles/layer-generic/fonts.scss

I also have two more questions:

  1. Will there be plugin support webpack-remove-empty-scripts? It doesn't work now, you have to do it with additional code in file server.js 208 - 220 line.
    webpack-remove-empty-scripts
    https://github.com/exocornet/express-template/blob/rspack/server.js

  2. Will there be full support for the plugin in the near future image-minimizer-webpack-plugin? It is sorely missed the way it worked before.

Thanks for the help and quick response.

@LingyuCoder
Copy link
Collaborator

LingyuCoder commented May 31, 2024

cc @jerrykingxyz , seems to be a bug of incremental build while handling assets, I made a more simple repro here, just rspack serve and modify the other.css

@exocornet
Copy link
Author

cc @jerrykingxyz , seems to be a bug of incremental build while handling assets, I made a more simple repro here, just rspack serve and modify the other.css

Hello. Yes, that's right, that's true. But webpack did not have this bug. Can you please tell me how to solve this problem? And also tell me, with the other two questions, are there already answers or solutions?

@jerrykingxyz
Copy link
Collaborator

@exocornet you can try set output.clean to false to workaround. The other two questions about plugin compatibility @h-a-n-a cc

@exocornet
Copy link
Author

@exocornet you can try set output.clean to false to workaround. The other two questions about plugin compatibility @h-a-n-a cc

Thank you very much, everything works. But I would like to have support like in webpack. And so I have to set isProd for clean. Although this may be more correct for local assembly, here I rely on your expertise.

@h-a-n-a Hello, I was advised to contact you regarding the two questions above. Can you suggest something?

I also have two more questions:

Will there be plugin support webpack-remove-empty-scripts? It doesn't work now, you have to do it with additional code in file server.js 208 - 220 line.
webpack-remove-empty-scripts
https://github.com/exocornet/express-template/blob/rspack/server.js

Will there be full support for the plugin in the near future image-minimizer-webpack-plugin? It is sorely missed the way it worked before.

Thanks for the help and quick response.

@h-a-n-a
Copy link
Collaborator

h-a-n-a commented Jun 12, 2024

@exocornet you can try set output.clean to false to workaround. The other two questions about plugin compatibility @h-a-n-a cc

Thank you very much, everything works. But I would like to have support like in webpack. And so I have to set isProd for clean. Although this may be more correct for local assembly, here I rely on your expertise.

@h-a-n-a Hello, I was advised to contact you regarding the two questions above. Can you suggest something?

I also have two more questions:
Will there be plugin support webpack-remove-empty-scripts? It doesn't work now, you have to do it with additional code in file server.js 208 - 220 line.
webpack-remove-empty-scripts
https://github.com/exocornet/express-template/blob/rspack/server.js
Will there be full support for the plugin in the near future image-minimizer-webpack-plugin? It is sorely missed the way it worked before.

Thanks for the help and quick response.

The plugin's relying on a few hooks that does quite expensive jobs on the JS side. We're not likely to support this.
https://github.com/webdiscus/webpack-remove-empty-scripts/blob/84157f850976c00474a97cc954f2a9837c2c0347/src/index.js#L53-L102

@h-a-n-a
Copy link
Collaborator

h-a-n-a commented Jun 12, 2024

Since the bug has been resolved, I will close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants