Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

shadrix's avatar
Level 12

How do I use `unpkg` with Vitejs?

I need your help to migrate my Vue plugin from Vue CLI to Vitejs. It is getting quite popular and I would like to maintain it in the future. But I am a bit confused about how to use Vitejs correctly.

First question: How do I use unpkg with Vitejs?

With vue-cli-service build I generate three files: index.common.js, index.umd.js and index.umd.min.js

In package.json I refer to these files with:

  "main": "dist/index.common.js",
  "unpkg": "dist/index.umd.min.js",

What should I write? Because Vite just creates random js files like: index.25e1eb44.js

0 likes
2 replies

Please or to participate in this conversation.