Cannot find module './vue-img-upload.vue' vue-img-upload/dist
sombriks opened this issue · comments
Leonardo Silveira commented
Hello all,
i have a small project still under development but i got a situation that may be a problem in the future.
In the docs, when using my compoment like this i got no errors and it gets rendered correctly:
const Vue = require("vue")
// const VueImgUpload = require("../dist/build")
const VueImgUpload = require("../src/main")
Vue.use(VueImgUpload)
require("../node_modules/flexboxgrid/css/flexboxgrid.css")
new Vue({
el: "#mountpoint",
render: (f) => f(require("./docs.vue"))
})
however, if i try to consume the dist/build version it gives me the following error:
i am worried since my lib will offer the dist/build.js as output. in previous situations, i used a workaround by simply doing require directly to the componente, although i don't think it's the recommended way.
any guidance is welcome.
the project uses browserify to bundle things.