ottosmaniotto/django-vuecli3

Incomplete and broken - avoid

Opened this issue ยท 9 comments

Incomplete and broken - avoid

@MikeBreytenbach, I fixed everything in my pull request (#4).

@MikeBreytenbach why did you laugh at my PR then change the title to FIXED without merging the PR in? I'm confused.

Hi @epicserve. I didn't laugh at your PR; I smiled to thank you for it.

I thought @ottosmaniotto had merged your PR in, that is why I changed the title to fixed. It's his repo - I can't merge your PR in. I removed the FIXED from the title pending ottosmaniotto merging the changes.

Thank you for your contribution!

@MikeBreytenbach,

Thank you for the clarification. FYI, this is why I thought you were laughing.

django-vuecli3 2019-12-14 13-34-46

I missed it that this was @ottosmaniotto's repo.

@ottosmaniotto,

Any chance you'll merge my PR in?

@epicserve I tried out yours. It works well, unless you want to use vue-router. It appends the publicPath set inside the config to whatever page you are on. 127.0.0.1:8000/ would become 127.0.0.1:8000/http://0.0.0.0:8080/test/ if redirecting to "/test/". Do you have any idea how this could be solved?

SHxKM commented

What's the difference between using this guide/repo and this one*, which seems much simpler?

* No affiliation whatsoever

@SHxKM, the article you linked to is much simpler and is probably a good option if you're just starting our with Vue. However, as you grow, you'll probably end up wanting and needing to use Javascript imports and transpiling, which means you'll need to probably need to use something like Webpack. I ended up creating my own custom Webpack config because several of the packages in this example are abandoned and no longer maintained.

@Shin-- You might have already resolved this problem but for anyone else stumbling on this: Unset the base property in your router. For example:

const router = new VueRouter({
    mode: 'history',
    // base: process.env.BASE_URL,
    routes,
})

@epicserve

I ended up creating my own custom Webpack config because several of the packages in this example are abandoned and no longer maintained.

Do you by any chance have your changes shared online somewhere? Or could you give some pointers about what (larger) changes you made to the Webpack config? Thanks!

@tharkay,

You can take a look at the Webpack config that's in my Django-base-site project. It's pretty custom and I'm not sure how much help it will be. I had to take a deep dive into Webpack to get it to do what I wanted it to do.