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!

+3
webpack vue.js summernote


source to share


No one has answered this question yet

See similar questions:

1
using summernote with vue js 2

or similar:

6
Angular2 webpack: how to import bootstrap css
2
Webpack creates additional JS file along with CSS file
2
Webpack and TypeScript cannot resolve declaration file for Vue
2
require.context for node modules does not work with associated package
0
Use Summernote with Vue Components Repositioning
0
Vue + summernote = TypeError: $ (...). Summernote is not a function
0
How to use React components from local npm package
0
Angular library as webpack dependency
0
Includes material-date-time loader in Vue 3 project
0
Rendering value from axios in Vue template



All Articles
Loading...
X
Show
Funny
Dev
Pics