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

Transforming file paths to support absolute paths #14

Open
nybblr opened this issue Sep 11, 2015 · 6 comments
Open

Transforming file paths to support absolute paths #14

nybblr opened this issue Sep 11, 2015 · 6 comments

Comments

@nybblr
Copy link

nybblr commented Sep 11, 2015

I currently use "real" URLs in my ember app, which unfortunately breaks the manifest since it uses relative paths.

To get around this, it feels like there should be a mechanism to transform paths (e.g. to add support for CDNs as well).

Thoughts? I'll be coding up a quick implementation on my fork.

@ssured
Copy link
Contributor

ssured commented Sep 18, 2015

I am having similar needs, have a look in pathprefix branch.

@ZackMattor
Copy link

Hey @ssured, any way we can get this merged in? I have another feature I would like.. but i'll open up a separate issue for that.

@ssured
Copy link
Contributor

ssured commented Oct 14, 2015

@ZackMattor I am not sure it is ready to merge yet; currently I am not using that code as we cannot get a CDN to work for our scenario; our need is no more. I am curious for what features you want and open for PRs

@ZackMattor
Copy link

I've been using the CDN branch for about a month now and it has been working fine for me :)

I need a way to allow for relative paths for certain builds (basically remove the preluding '/' from each line)

@krachtstefan
Copy link

Great work @ssured! I also tested the pathprefix branch and it works for me.

But there is an issue when using includePathsto add an external resource. Using
includePaths: ['http://fonts.googleapis.com/css?family=Open+Sans:400,700']
ended in
http://my.cdn.url.com/http://fonts.googleapis.com/css?family=Open+Sans:400,700.

But it is possible to fix that when you set pathPrefix as a function:
pathPrefix: function(file){ return file.startsWith("http") ? file : 'http://my.cdn.url.com/'+file; }

@ssured
Copy link
Contributor

ssured commented Nov 24, 2016

Cool, seems like a nice solution. Can you make a PR?

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

4 participants