canjs / can-compile

Compile CanJS Mustache and EJS views for lightning fast production apps
http://daffl.github.com/can-compile
MIT License
35 stars 15 forks source link

Fix: Domains for new Subdomain Style #52

Closed frank-dspeed closed 7 years ago

frank-dspeed commented 7 years ago

Kevin Phillips @phillipskevin 18:21 @ablackthorn you say this is breaking your app in production?

ablackthorn @ablackthorn 18:23 We use can-compile to store compiled templates in a database, so yes it broke in production. I modified resolveScripts.js to use the new urls to fix it.

frank-dspeed commented 7 years ago

https://github.com/frank-dspeed/can-compile/blob/master/lib/resolveScripts.js

Little Idea about this.

Yerrak commented 7 years ago

I would propose to just follow redirects for resolving the script urls. There might (again) come the day where redirects occur and I would assume that the redirects themselves will be kept updated while the url itself might change again.

We just used var http = require('follow-redirects').http; (see https://github.com/olalonde/follow-redirects/) to make sure the redirect urls resolve correctly.

frank-dspeed commented 7 years ago

@Yerrak thx for the nice module tip will watch into the code it looks realy usefull :)

Schweinepriester commented 7 years ago

+1000

andre-cgn commented 7 years ago

+9000

chasenlehara commented 7 years ago

@daffl restored the /release/ scripts on canjs.com so this should no longer be an issue.