我最近尝试使用React starter'create-react-app'和Monster Admin Template,它位于bootstrap 4上 . 这个模板的Javascript文件需要jQuery . 我尝试导入到index.js

import $ from 'jquery';

并通过导入模板所需的所有javascript文件,但我收到Failed

然后我用'npm run eject'来配置webpack文件并添加

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

但模板文件仍然没有看到'$'jQuery .

有没有人有类似的问题?