When using vue-cli to build my lib, I run the following command:
"build": "vue-cli-service build --target lib --name myLib ./src/component.vue"
After the build, how can I import my component from the dist folder?
Importing from path-to-myLib/src/component.vue
works perfectly fine! However, the following code doesn't seem to work:
// undefined
import { component } from 'path-to-myLib/dist/myLib.umd.js'
// undefined
import myComponent'path-to-myLib/dist/myLib.umd.js'
// result: https://i.sstatic.net/xHSzL.png
import * as myComponent'path-to-myLib/dist/myLib.umd.js'
I'm unable to figure out what the issue might be.