popper.js in bootstrap 4 gives SyntaxError Unexpected token export

Just got this too and figured why it really happens. In case others get by here:

Check the readme.md "Usage". The lib is available in three version for three difference module loaders. In short: if you load it with the <script> tag then you must use the UMD version. You can find it in /dist/umd. The default (in /dist) is the ESNext (ECMA-Script) which can not be loaded using the script tag.


Bootstrap 4 requires the UMD version of popper.js, and make sure the order is as follows:

<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="~/Scripts/jquery-3.0.0.min.js"></script>
<script src="~/Scripts/umd/popper.min.js"></script>
<script src="~/Scripts/bootstrap.min.js"></script>