Home > OS >  How do I load public resources with a hashtag symbol in Webpack?
How do I load public resources with a hashtag symbol in Webpack?

Time:10-23

I am designing a musical application with Vue and Quasar under the Webpack bundler system. One of the requirements is to load sound files from the public folder. Given the musical nature of this application, some of the files contain the # symbol, for example, 078-F#.wav. When I try to import this file, it becomes truncated to 078-F and thus fails to load. How can I reconfigure my project to allow the sharp symbol in file names?

The asset files will change often and renaming them is not a practical solution.

CodePudding user response:

I was able to overcome this issue by replacing all instances of # with the corresponding URL character, #.

  • Related