Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Viewer doesn't work when fingerprinting for ".json" is enabled #54

Closed
Davidhidalgo opened this issue Feb 27, 2018 · 6 comments · Fixed by #61
Closed

Viewer doesn't work when fingerprinting for ".json" is enabled #54

Davidhidalgo opened this issue Feb 27, 2018 · 6 comments · Fixed by #61

Comments

@Davidhidalgo
Copy link

Davidhidalgo commented Feb 27, 2018

With:
fingerprint: {
enabled: true,
}
on ember-cli-build.js, svg-jar viewer page is trying to load the file with the fingerprint (like svg-jar-5aaba2f0819df980dd1e5a835456e821.json, but the viewer builder creates: svg-jar.json

@voltidev voltidev changed the title Viewer doesn't work when fingerprinting is enabled Viewer doesn't work when fingerprinting for ".json" is enabled Feb 27, 2018
@voltidev
Copy link
Collaborator

You could add it to the exclude array like so:

  fingerprint: {
    exclude: ['svg-jar.json'],
    ...
  }

Please close the issue if it works for you.

@Davidhidalgo
Copy link
Author

This doesn't work. I thinks is because the builder is creating the file on the build.

@voltidev
Copy link
Collaborator

Can you post your ember-cli-build.js or its part?

@Davidhidalgo
Copy link
Author

Sure!

{
    fingerprint: {
      enabled: true,
      exclude: [
        'svg-jar.json'
      ]
    },
    outputPaths: {
      app: {
        css: {
          'common-styles-for-django': 'common.css'
        }
      }
    },
    svgJar: {
      sourceDirs: ['public/assets/icons']
    }
}

@voltidev
Copy link
Collaborator

voltidev commented Feb 27, 2018

It looks like it's a bug of fingerprint. Anyway you could add something like this and it should work:

    fingerprint: {
      enabled: true,
      extensions: ['json', 'js', 'css', 'png', 'jpg', 'gif', 'map']
    },

There's an issue at broccoli-asset-rev about this problem: ember-cli/broccoli-asset-rev#94

I'll change the asset name in the next release as a workaround.

@Davidhidalgo
Copy link
Author

Thanks @ivanvotti! Works perfectly! :)

voltidev pushed a commit that referenced this issue Mar 26, 2018
Add workaround for broccoli-asset-rev bug -- fixes #54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants