Home  >  Q&A  >  body text

Vue3 project not working after vite build in production mode

I have a project that runs fine in development mode, but if I build the project using "vite build" some components won't work.

There are no errors in the console or build log.

Use vite build --modedevelopment to generate the bundle and the project runs fine.

I created a POC to make it easier to show everyone the problem.

P粉533898694P粉533898694314 days ago462

reply all(1)I'll reply

  • P粉868586032

    P粉8685860322023-12-11 11:01:52

    The vue-collapsible-panel package you are using is not very popular and there is this open issue when doing production builds, so I'm guessing it has nothing to do with Vue/Vite.

    I recommend you to use other more popular/supported packages.
    You might find something interesting here: https://github.com/vuejs/awesome-vue#menu

    reply
    0
  • Cancelreply