I have this in my nuxt.config.js:
build: {
plugins: [
new webpack.ProvidePlugin ({
'$': 'jquery',
'jQuery': 'jquery',
'_': 'lodash'
}),
],
vendor: [
'jquery',
'jquery-ui',
...
But, I still get this error:
[vue-router] Failed to resolve async component default: ReferenceError: jQuery is not defined
[vue-router] uncaught error during route navigation:
ReferenceError: jQuery is not defined
at $.widget.version (S:\Projects\fomatics\node_modules\jquery-ui\ui\widgets\draggable.js:35:12)
at Object.<anonymous> (S:\Projects\fomatics\node_modules\jquery-ui\ui\widgets\draggable.js:37:2)
What am I doing wrong?
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c893">#c893</a>)</em></sub></div>