Bootstrap modal box failure $(.). Modal is not a function

webpack is packaged, jquery is placed in front of bootstrap, or error is reported. Why?

js

$("-sharplastPageModal").modal();

Local html

<script src="../lib/jquery.js"></script>
<script src="../lib/bootstrap.js"></script>
<script src="../lib/bootstrap.min.js"></script>
<script src="../lib/jqthumb.js"></script>
<script src="../lib/jqthumb.min.js"></script>
    <!---->
    <div class="modal" tabindex="-1" role="dialog" id="lastPageModal">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title"></h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true"></span>
                    </button>
                </div>
                <div class="modal-body">
                    

</div> <div class="modal-footer"> <button type="button" class="btn btn-primary" data-dismiss="modal"></button> </div> </div> </div> </div>

dist/html

<script src="../lib/jquery.js"></script>
<script src="../lib/bootstrap.js"></script>
<script src="../lib/bootstrap.min.js"></script>
<script src="../lib/jqthumb.js"></script>
<script src="../lib/jqthumb.min.js"></script>

webpack

new htmlWebpackPlugin ({
    filename:"index.html",
    template:"index.html",
    inject:"body",
    chunks:["index"]
}),

Code folder

clipboard.png


feels that the script quotation order may be out of order. You can reverse the js order in chunks and try


new webpack.ProvidePlugin({
            $: 'jquery',
            jQuery: 'jquery',
            'window.jQuery': 'jquery',
            Popper: ['popper.js', 'default'],
        })

this is written in the webpack code, which causes the jquery to become invalid. It is no problem to delete it

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b37834-2c080.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b37834-2c080.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?