Summernote is not a function when creating a Vue component
I'm trying to make a Wrapper for summernote (the ones I found on the internet didn't do exactly what I needed, like emitting the whole event).
I am importing jquery inside webpack.base.conf.js
plugins: [
new webpack.ProvidePlugin({
$: "jquery",
jQuery: "jquery"
})
],
Then, inside the component, I require bootstrap, lang package and some CSS:
require('bootstrap');
require('summernote');
require('summernote/dist/summernote.css');
require('summernote/dist/lang/summernote-pt-BR.min.js')
import axios from 'axios'
export default {
However, when I go into render () method and initialize summernote in jQuery element, I
$ (...). summernote is not a function
If I try console.log (summernote) it returns undefined or even an empty object.
I imported it using NPM as well as jquery, bootstrap ...
I've worked on this before, but I deleted my node_modules folder and installed it again. Maybe I had an addiction that I don't see now? Since the code itself has not been changed, only the node_modules folders. But I don't know what I might be missing at this stage.
Any ideas?
Thank!
source to share
No one has answered this question yet
See similar questions:
or similar: