0

I have created a Vue plugin for wordpress. Everything works fine in my local environment. This is my public/index.html. I only included this my wordpress plugin. Run the npm run serve.

Now I have a problem to deploy to my production site. I did npm run build and changed the wordpress plugin to point to dist/index.html. But I get a blank page.

Do I still need to run a npm server?

<!DOCTYPE html>
<html lang=" en">

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900|Material+Icons" rel="stylesheet">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
  <title>standing order</title>
</head>

<body>

  <div id="app"></div>
  <!-- built files will be auto injected -->
  <script type="text/javascript" src="http://localhost:8083/app.js?ver=4.9.8"></script>

</body>

</html>
Jake He
  • 2,417
  • 3
  • 29
  • 41

1 Answers1

0

In production you have the files but you don't need npm run serve. Just upload the bundle.

also here they explain in more detail here. How to deploy Vue app?

@AndyHayden an AWS S3 check if 1) index & error document === index.html; 2) policies are set for static website; 3) your build.js is inside dist folder on s3, and index.html is in the root.

men32z
  • 186
  • 4
  • 10