GithubHelp home page GithubHelp logo

Comments (3)

Duder-onomy avatar Duder-onomy commented on June 12, 2024 1

Ok, update from my end.

I believe this library to be inlining the SVG into a file at build time, then looking the SVG up by path during runtime.
On development builds everything works fine because the path in the template and the path in the built file are the same. Issues arise when you have paths changing, in my case, and I believe in @timiyay case above, we are using asset fingerprinting. The fingerprinting runs before the inline-ing, so the path it uses to lookup the file and the path it used to inline the svg into JS are different.

I was able to solve this issue by ignoring the inlined svg's from my fingerprinting.

module.exports = function(defaults) {
  const app = new EmberApp(defaults, {
    fingerprint: {
     // ...
      exclude: ['assets/images/my-inlined-svg.svg'],
      extensions: ['js', 'css', 'png', 'jpg', 'gif', 'map', 'svg', 'ttf', 'woff'],
     // ...
    },

More info on ember-cli asset fingerprinting:
https://ember-cli.com/asset-compilation#fingerprinting-and-cdn-urls

from ember-inline-svg.

Duder-onomy avatar Duder-onomy commented on June 12, 2024

I am having an identical issue,

this library throws:

Assertion Failed: No SVG found for ***

But when I visit that URL the svg is displayed correctly.

@rlivsey Can you chime in and let us know next steps here? Maybe explain how this works under the hood so we can help debug it.

from ember-inline-svg.

timiyay avatar timiyay commented on June 12, 2024

Closing this issue as stale.

from ember-inline-svg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.