It worked properly in dev version, but in the build version, the whole thing is doomed.
paths to static assets and files were completely wrong, the css files didnt apply.
I tried to correct the paths manually and it did work, but even font awesome icons didn't show up.
I'm beginner stage in Gatsby. As per Gatsby tuts, I did the develop and build the my first app in Gatsby. Also successfully generated public folder. All the preview render well in "http://localhost:8000/" as expected. But, when I directly run the index.html file from public folder, in the browser(using with/without localhost) it's not preview the images. Could anyone tell me why? Any help would be much appreciated.
In "localhost:8000" preview render well with images. But Just I tried
to run directly index.html file from the public folder. But, It's
appear layout without images, Only HTML/CSS renders.
When you access localhost:8000 you are accessing the index.html of your compiled project, but you can't take that file isolated because you have a bunch of bundled assets (JavaScript, images, CSS, etc).
When you run gatsby build you are compiling and bundling all your assets (React components, third-party dependencies, Gatsby's core dependencies, images, and their processing, etc) via webpack. All this bundle, surrounded by React's code, is outputted in the /public folder.
From the documentation:
gatsby build creates a version of your site with production-ready
optimizations like packaging up your site’s config, data, and code,
and creating all the static HTML pages that eventually get rehydrated
into a React application.
What do you get from a successful build?
When a Gatsby build is successfully completed, everything you need to
deploy your site ends up in the public folder at the root of the site.
The build includes minified files, transformed images, JSON files with
information and data for each page, static HTML for each page, and
more.
The final build is just static files so it can now be deployed.
You can run gatsby serve to test the output from compilation. If you
make any new changes to the source code that you want to preview, you
will have to rebuild the site and run gatsby serve again.
So, you can run directly the index.html file because you will be missing some assets, keys to the good operation of the project.
You also have a section in the docs related to Deployment and Hosting as well as some related blog posts (Deployment and Hosting respectively).
gatsby serve, on the other hand, just opens the port in your local browser.
Which file I need to share/upload in server to give others view/demo?
All the /public folder.
run: gatsby build or gatsby serve and then try to open your website after running that command. Don't worry you can still work on it as usual after running build or serve commands.
Is there any way to serve a polymer 2/3 project on IIS instead of webpack? I searched about it but I haven't found anything really useful for me.
I started working with Angular 2 and have one issue.
I compiled my app for production through "ng build" and got an index.html and other files like js and css in this folder.
I need to publics them on web
Im using remote ubuntu on digital ocean.
I found this nice script, which solved a problem, but to enter a project I need to print in a browser a path like this: somehost:8080/index.html.
Can you help please and explain please, how I can use a path like somehost:8080, or just somehost:8080/index, but without a file extension? I found of course, even simpler scripts, but they dont serve js and css, which are included.
And next question, actually main, is this decision the most elegant to provide an entrance to the app, or there is a better and smarter way? Afterwards, Im thinking about PM2, because all that I need is to launch it like a linux service and to reload the app, if it will be crashed.
Thanks!
I just started using Trigger.io and am building a movie mobile app using backbone.js and require.js but without much success.
My project scaffold is generated by Grunt-BBB.
It runs fine when it's built and run as a web app ("forge build web", & then "forge run web"), but unfortunately, it fails to load the JS files when it's built and run as iOS or Android. I've looked through the demo Backbone.js example, but it's not using Require.js.
I realize that Require.js is async in nature and that might be the root cause of it not working when running on the mobile.
Any alternative to Require.js or work-around to get Require.js working with Trigger.io will be appreciated! Thanks!
I just had a go with Require.js in a Trigger.io app and it seems to be working fine on both iOS and Android. I don't have an app setup with Grunt-BBB so I haven't tested that.
When running on Android you should see any Javascript errors that occur in the log output, do you see any, and if so are they at all helpful?
Otherwise if you could zip up the src folder of the app you are trying to build and send it to support#trigger.io we can take a more detailed look at what is going wrong.