Welcome to 16892 Developer Community-Open, Learning,Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

使用了import Sortable from 'sortablejs'后提示,如果去使用Sortable是不会报错的,求解

This dependency was not found:

  • jquery' in ./node_modules/sortablejs/modular/sortable.complete.esm.js

To install it, you can run: npm install --save jquery'

image.png


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
3.3k views
Welcome To Ask or Share your Answers For Others

1 Answer

找到原因了,
webpack.base.conf.js 配置中写错了,在jquery后面多写了个'
plugins: [

new webpack.ProvidePlugin({
    $: "jquery",
    "window.jQuery": "jquery",
})

]


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to 16892 Developer Community-Open, Learning and Share

548k questions

547k answers

4 comments

56.5k users

...