2👍
When you npm run build
Webpack should produce an index.html
file along with a static/
directory that contains all of your javascript and css. The link to static/
is an absolute link (i.e. http://example.org/static
). When you try to open index.html
as a file, the browser will look for the /static/
folder on the root of your file system, which of course it won’t find.
To run it locally you need to fire up an http server locally. One option is to cd
into the directory with a terminal app and run python -m http.server
. Then go to http://localhost:8000/
. That should work because the root of the directory tree will be the folder from where you are serving it.
Getting it running on AWS S3 will be a matter of making sure you get the static directory in the right place and get the links pointing to it. Hard to say exactly how without knowing details of how you are organizing the site in your bucket.
You can change how the static folder is saved in the webpack config if you need to: https://vuejs-templates.github.io/webpack/static.html
0👍
You will find a folder named /dist in your project directory.Just point the index.html file within the /dist directory and rest will work fine I think. I have just done that and it’s working fine.
Hope it will work.
Thanks.