0

Hi I need some help to understand VUE. I'm trying to create an app that is a consent manager, In order to work properly it should be just one JS file, this way the dev can just load this file in the body and the consent manager would be there...

My question is, how I can create the hole app in just one JS file, I read a bunch of posts here and looked for it but I couldn't found (I didn't had enough knowledge to understand) how I can do it.

To make thing easy, I'm trying to follow the same functionality as Klaro consent manager. You can check the project here.

It's a pretty awesome project but it uses React and I want to use VUE.js, but when I run build it generates a dist folder with a lot of files. Can I generate only one?

Thanks in advance!

  • 3
    there is nothing to do with vue here or any other libs. You're looking for a bundler like rollup, webpack etc – quirimmo Oct 11 '21 at 07:47
  • Ohh, I see! Thank you very much @quirimmo, `VUE` uses webpack, right? So should I look on "how to build one `js` file webpack?" thanks and if you can, please right an answer so I can accept. Thanks – Caio César P. Ricciuti Oct 11 '21 at 07:52
  • If you use Vue CLI this should be explicitly stated. Vue !== Vue CLI. – Estus Flask Oct 11 '21 at 08:06
  • 1
    Possible duplicate of https://stackoverflow.com/questions/54748202/turn-off-seperate-chunks-for-css-vue-cli-3-webpack-4 – Estus Flask Oct 11 '21 at 08:07
  • Vue CLI uses webpack, Vite uses Rollup. I'd recommend the latter, way less to configure and faster development hot deployment: https://vitejs.dev/ – Thomas Oct 11 '21 at 09:50

0 Answers0