DEV Community

Discussion on: Django + webpack + Vue.js: setting up a new project that’s easy to develop and deploy (part 1)

Collapse
 
vmihalachi profile image
Vlad Mihalachi

Hey bro, did you notice they changed the vue-cli template for webpack?
I just started a new project and saw that they deleted webpack-hot-middleware and other stuff.
What's the new approach? :(

Collapse
 
ariera profile image
Alejandro Riera • Edited

Fairly easy actually, you just need to add this to your build/webpack.dev.conf.js

devServer: {
  headers: {
    "Access-Control-Allow-Origin":"\*"
  },
  // ...
}

I updated the post with that and more info (check this repo github.com/ariera/django-vue-template) :)
I also decided to keep the whole content of the post on my blog and just add an excerpt and link it from my account on dev.to. The main reason is that it was becoming to confusing to maintain both posts. After receiving so much feedback I couldn't remember where I had changed what :-S

Collapse
 
ahumblenerd profile image
Arun Purushothaman

I just tried it. You dont have to worry about HMR atleast.