Summernote package cannot find jQuery using Webpack Encore

Viewed 13

I'm trying to load package named Summernote using Webpack Encore (from Symfony), but on build I'm receiving error:

Module build failed: Module not found:
"./node_modules/summernote/dist/summernote.js" contains a reference to the file "jQuery".
This file can not be found, please check it for typos or update it if the file got moved.

I tried to fix it in methods like:

// webpack.config.js
.autoProvidejQuery()

and

// webpack.config.js
.autoProvideVariables({
    $: 'jquery',
    jQuery: 'node_modules/jquery',
    'window.jQuery': 'jquery'
})

and

// main.js
var $ = require('jquery');
global.$ = $;
global.jQuery = $;

Thanks for help.

0 Answers
Related