Vue.js hot reboot over ..apache?

So my backend is based on PHP (processwire), served by reliable old MAMP ( localhost:8888/mysite). I would also like to serve the vue.js application from the same server.

npm run devruns a local server on localhost:8080, which works to work with the interface, hot reboot and all.

With npm run buildI can create my application so that it can be submitted from MAMP.

But how do I get a hot reboot working on MAMP so that I can continue to evolve through apache (using localhost:8888/mysite)? Is it possible?

Thank you!

+4
source share
2 answers

, , Apache. , webpack.config.js:

proxy: {
      '/mysite/api/**': {
        target: 'http://localhost:8888',
        secure: false,
        "changeOrigin": true
      }
    }
+1

dev- webpack, .

apache - . , (, Apache webpack-dev-server localhost:8080

ProxyPass        /mysite http://localhost:8080/mysite
ProxyPassReverse /mysite http://localhost:8080/mysite

, - Webpack /mysite. . - Vue ( vue-cli), assetsPublicPath /config/index.js

+1

Source: https://habr.com/ru/post/1657392/


All Articles