I'm using vue-cli for build my lib with this command:
"build": "vue-cli-service build --target lib --name myLib ./src/component.vue"
How can I import my component from the dist folder after the build?
If I import from path-to-myLib/src/component.vue
, everything is fine! But the code below does not 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.stack.imgur.com/xHSzL.png
import * as myComponent'path-to-myLib/dist/myLib.umd.js'
I cannot understand what the problem is.