Closed amitrajput1992 closed 7 years ago
So in short you want to be able to specify the absolute url. Rather than add another option perhaps detecting this in a renamed bundleFromRoot
would be a better solution. PR would be much appreciated :)
I will setup a PR soon
sent #281 for this issue. @mikearmstrong001, please review.
Many thanks I'll take a look
closing and moving discussion to PR
Where we can get path of bundle.js and main.bundle.js in our local how we can put these on CDN and serve to our application?
Description
Is there a way to serve up the bundled files from a different server than where the application runs?
For ex. after bundling both client.js and index.js I want to serve these files from
http://cdn.exp.com/***
to (take advantage of caching and other stuff) rather than to have these in the website directory. I see that inside VRInstance.js, the bundle(index.js) is always referenced from the working directory insidebundleFromRoot
function. Though client.js bundle can be requested from external server. Since both of these are standalone bundles after building, it would be ideal that these can be referenced from any location, be it inside the app directory or on a different server.I can set up a PR to address this issue if this wasn't on the roadmap for react-vr.
Expected behavior
Serving bundled files from a different source.
Actual behavior
VRInstance references bundled files always from the root directory.
Solution
Add additional param for VRInstance options {bundleFromRoot: true/false} and corresponding test for this while referencing the bundles.
Additional Information