Closed nxf closed 4 years ago
That's because the build output is meant to be served by a webserver, not just opened from disk. If you open the browser console (F12), you'd see something like this:
That means the browser is trying to find main-xxx.min.js
and main-xxx.min.css
in the website root, which, when you open the file that way, is… none.
There are some easy to use webservers with no configuration needed, for example :
$ npm install -g http-server
$ cd dist
$ hs -o # -o opens the browser automatically
Starting up http-server, serving ./
Available on:
http://127.0.0.1:8080
Hit CTRL-C to stop the server
I cloned the project from master, When npm start, I can see the page. But when I execute the command, npm run build, It produce the dist/index.html and css/jss. But When I access the index.html from browser, I can not see anything. It's blank.