visma-meglerfront/sweet-modal-vue

Cannot find module "./components/SweetModal"

davodaslanifakor opened this issue · 5 comments

hi i use SweetModal so npm install sweet-modal-vue and then
import { SweetModal, SweetModalTab } from 'sweet-modal-vue'

components: {
 SweetModal,
 SweetModalTab
}

load
how fix this ....??

I had to do this

import SweetModal from 'sweet-modal-vue/src/components/SweetModal.vue'

If you want the SweetModalTab

import SweetModalTab from 'sweet-modal-vue/src/components/SweetModalTab.vue'

so yes fix this problem bu i have new problem....
scss
so i use that npm install --save-dev node-sass sass-loader
but don't fix ....

and remember i use less inside my project ....

try this

import SweetModal from 'sweet-modal-vue/src/plugin';

Path for import is

 import SweetModal from 'sweet-modal-vue/src/plugin.js'

add this into webpack.config if you use plugin globally.

resolve: {
      alias: {'vue$': 'vue/dist/vue.esm.js'},
      extensions: ['.js', '.vue'], // this string resolve your problem
}