3

I have a project with an existing webpack setup and it's unrelated to Vue.

Until now I have multiple entry points setups and some of these entry points are opening some iframes popups, and the plan is to build these iframes with VUE.

This means that I will also have multiple VUE entry points, this shouldn't be a problem but what I can't figure out is:

  • what is the best way to add VUE-cli into this already existing setup and use the same node_modules folder

  • Also to be able to add the vue-cli build commands to be run/triggered after my existing webpack build commands.

Let me know if more details are needed?

1
  • I upvoted because I'm curious if there's a way, but considering how webpack config works with vue-cli, I think it's impossible. vue-cli presumes to own the webpack config, so I don't think it can be "part of" existing webpack project. I think you would have to reconfigure everything with vue.config.js Commented Dec 25, 2019 at 13:01

1 Answer 1

1

I've figure it out and it turn out that you can have both in the same project.

I've used vue create on my existing project folder and there is a prompt with a merge options.

Unfortunately it deleted my dependencies but was not such a big deal. Just had to reinstall them.

Now my project's webpack configuration remained completely separate form vue-cli which is handled by the vue.config.js and this is exactly what I wanted.

I am using something like this to build everything at once:

"build": "webpack --config webpack.prod.js && vue-cli-service build"
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.