Import DDS file in Vue.js?

Hello,

We are trying to import a DDS file using Vue which uses webpack but we cant load the file directly because it requires a loader.

We tried using the raw loader from webpack but then the file is imported as text and causes other errors.

Anyone has experience on how to handle this?

You could use the URL loader that will give you a base64 URL or a local URL that is hosted in your public directory by webpack. That’s what I do here -

Webpack doesn’t really care what file type you are loading

2 Likes