I have a Vue 3 library. In package.json I have:
"main": "dist/index.js",
"unpkg": "dist/index.umd.min.js",
In vue.config.js I have:
configureWebpack: config => {
config.output.filename = 'index.js';
},
To build library I do:
vue-cli-service build --target lib --name index src/index.ts && tsc --emitDeclarationOnly --outDir dist -p tsconfig.json
src/index.ts
is a file that exports all classes, interfaces etc.
However, when I build my library I have the following in dist
:
demo.html
index.common.js
index.common.js.map
index.umd.js
index.umd.js.map
index.umd.min.js
index.umd.min.js.map
src
tsconfig.tsbuildinfo
As you see there is no index.js
but there is index.common.js
. Could anyone say how to fix it?