D
D
dulgeoion2018-02-19 11:38:04
React
dulgeoion, 2018-02-19 11:38:04

How to push Webpack+React application to github pages?

Hello. The essence of the question is this: how can I upload a regular react project using webpack-dev-server to github pages? It is clear that it is necessary to rebuild all this goodness, but I don’t know how to do this and I can’t find it on the Internet. I found only variants of the create-react-app beadle, but my application was not built on it. As an option, there is a project to migrate to it, but perhaps there is a way that does not require this.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim, 2018-02-19
@dulgeoion

Do you need webpack-dev-server for github pages? If yes, then no way.
On github you can upload the "build" of your application: that is, your index.html + images + styles (css) + scripts (your bundle and everything else you need from js).
To get a build, you need to collect it. What will be as a result of the assembly is what you need to fill in on pages.
A running server (on node.js or whatever) - won't work on pages (or any examples?)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question