Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to add .ttf files and .woff files during plug-in development?

lamella
Contributor
March 31, 2022

I tried to use vue in the VM file and introduced element UI, the fonts and icons that come with element UI in offline mode are .ttf and .woff files, how should I add these two files to the plugin and make them available Is it being accessed normally?

1 answer

1 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 31, 2022

Generally, resource files like that would be located in the "resources" directory, probably in a subdirectory for fonts.

But the engine you are putting into your app to use them could probably read them from anywhere you want.

lamella
Contributor
March 31, 2022

Hi Nic,

I just put these two file in resources like this image

微信截图_20220401094834.png

And I put these in <web-resources> in atlassian-plugin.xml like this

web-resource.png

But it doesn't work, when i try to get these two files, I get 404 from chrome

404error.png

With out these two files, vue and element UI works fine.

Please skip my naming questions, I know it's out of spec, I'll fix them later in development : )

lamella
Contributor
March 31, 2022

Hi Nic,

I read this 404 error link, may I put these two files in the wrong location, and I put these in the correct location and modified <web-resources> in atlassian-plugin.xml like these images

resources.pngweb-resource.png

But it didn't work, I still got 404 error from chrome

Suggest an answer

Log in or Sign up to answer