Dev-client / dev-server

Hi,

I am a new Vue user, so I discover the framework.

I have a question about the project architecture.

I am trying this tuto for use Vue with Django :
https://ariera.github.io/2017/09/26/django-webpack-vue-js-setting-up-a-new-project-that-s-easy-to-develop-and-deploy-part-1.html

and I am blocked at the step "Hot realod or Hot Module Replacement (HMR)"
I need to modify the files build/dev-client.js and build/dev-server.js but I can’t find them.
It is normal ?

The page is dated to 09/26, so it’s not old.

Why I can’t find these files ?

Thanx for your help

Yes - those files were removed two days ago - we replaced our custom dev-server with the default one from webpack - webpack-dev-server.

The options for this dev-server are defined in /build/webpack.dev.conf.js.

You can define the headers from the tutorial there.

devServer: {
  headers: {
    "Access-Control-Allow-Origin":"\*"
  },
  // the rest of the existing options.
}

I’m unsure about that path option, though.Maybe the public option? Try setting it to http://localhost:8080 (leave out the __webpack_hmr aprt)

Thank you !

I changed the headers in /build/webpack.dev.conf.js
and it works !
Now I have what I wanted, Django is running and I see my modifications on Vue in real time.

I can try Vuejs now :slight_smile:

1 Like

Happy Hacking :slight_smile:

If you wanna say thanks to the author of the tutorial, write him or open an issue on his github so he can update his page.

Yes, I sended a mail to him :slight_smile:

1 Like