What worked for me was
const logo = require('./logo.svg') as string;
If it doesn't work, try:
const circle = require('!!raw-loader?!../assets/logo.svg') as string;
It will disable the default file loaders and return the file contents.
You can also import the file at runtime:
constructor(http: HttpClient) {
http.get('/assets/logo.svg', {responseType: 'text'})
.subscribe(svg => console.log(svg));
}
or use it as an image source:
<img src="logo.svg" />
Please note that your SVG won't work immediately as it has an invalid format. I had to add version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
to the <svg>
tag to make it display:
<svg viewBox="0 0 104 104" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
...
</svg>