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

feature request: disable prepend for some files, but keep fingerprinting #95

Open
Leooo opened this issue Apr 10, 2016 · 8 comments
Open

Comments

@Leooo
Copy link

Leooo commented Apr 10, 2016

Hello, my use case is the following: using web workers with Ember:

this.worker=new Worker("assets/workers/worker_ls_serializer.js")

For the files in my workers folder that I call with importScripts, I have to disable prepending the CDN because of CORS issues for worker scripts (has to be the same domain), so I'm using exclude: ['worker'] though we need to still keep the fingerprinting for normal version control.

for reference: ember-cli/ember-cli#1011 http://stackoverflow.com/questions/24175120/ember-cli-project-and-web-workers/36529757#36529757
Thanks,

L

@Leooo Leooo changed the title feature requestion disable prepend for some files, but keep fingerprinting feature request: disable prepend for some files, but keep fingerprinting Apr 10, 2016
@rickharrison
Copy link
Collaborator

For full disclosure, this is not something I will have the time to work on anytime soon. If this is a feature you need, please submit a pull request.

@Leooo
Copy link
Author

Leooo commented Apr 20, 2016

will try rick, thanks

@PratheepV
Copy link

@Leooo , Any chance you tried it. Please share. We are also looking for same.

@Leooo
Copy link
Author

Leooo commented Aug 14, 2016

@PratheepV no I didn't have the time to sort that out, copy/pasting the whole file I need (localforage) in each worker for now to go around this issue, which is very ugly. Anyone with a PR for this would be great thanks.

@jembezmamy
Copy link

I need something exactly opposite (keep prepending and disable fingerprint for some files). I've got files that are used by external services, so they cannot be fingerprinted and at the same time I reference them in my code, so these references should get prepended with a domain name.

Maybe I can prepare a PR, but not now, I'll think about it next week.

@mangatinanda
Copy link

@jembezmamy did you find a way to disable fingerprint for some files but not prepending?

@mangatinanda
Copy link

As a workaround, I have used broccoli-asset-rewrite for prepending.

@jembezmamy
Copy link

@mangatinanda Sorry, I forgot about this issue. Our workaround involves creating symbolic links on the server, so i.e. embed.js would be accessible also without fingerprint:

ln -s embed*.js embed.js

And then generating URLs for these files manually:

`<script src="${ENV.assetHost}assets/embed` + `.js" async></script>`

But this solution is good only if you have only few files to exclude from fingerprinting. On a bigger scale it would be a mess.

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

No branches or pull requests

5 participants