samrum / vite-plugin-web-extension

A vite plugin for generating cross browser platform, ES module based web extensions.
MIT License
323 stars 33 forks source link

Fonts imported by css are not web accessible #119

Open ttoino opened 1 year ago

ttoino commented 1 year ago

When I import local font files using css they get compiled but they are not web accessible, as they are not referenced in the manifest, and I can't add them manually because of the hash that is added.

samrum commented 1 year ago

Can you provide a repo that reproduces the issue?

ttoino commented 1 year ago

Sure thing! In this repo, I ran npm init @samrum/vite-plugin-web-extension@latest, and left everything as default. Then I installed remixicon so I had a local font to test with and replaced the default code with a single index.css that just sets the font of every element to this one.

Running serve:firefox and navigating to a page I get the following errors in the console:

image

And the following when running serve:chrome:

image