i have node 8.4.0, npm 5.4.1, angular-cli v 1.3.2
Steps to reproduce the problem:
"scripts": [
"../node_modules/jquery/dist/jquery.min.js",
"../node_modules/popper.js/dist/popper.js"
],
VM1018:2297 Uncaught SyntaxError: Unexpected token export
at eval ()
at webpackJsonp.../../../../script-loader/addScript.js.module.exports (addScript.js:9)
at Object.../../../../script-loader/index.js!../../../../popper.js/dist/popper.js (popper.js?6efa:1)
at __webpack_require__ (bootstrap 88f7324…:54)
at Object.2 (scripts.bundle.js:66)
at __webpack_require__ (bootstrap 88f7324…:54)
at webpackJsonpCallback (bootstrap 88f7324…:25)
at scripts.bundle.js:1
webpackJsonp.../../../../script-loader/addScript.js.module.exports @ addScript.js:9
../../../../script-loader/index.js!../../../../popper.js/dist/popper.js @ popper.js?6efa:1
__webpack_require__ @ bootstrap 88f7324…:54
2 @ scripts.bundle.js:66
__webpack_require__ @ bootstrap 88f7324…:54
webpackJsonpCallback @ bootstrap 88f7324…:25
(anonymous) @ scripts.bundle.js:1
if i add bootstrap before popper.js, bootstrap says that he need popper.js
You should use the esm build with webpack
@FezVrasta can you help me a little bit more? What does it mean use the esm build? Any link for example how to configure ang4 app to esm build?
dist/esm/popper.js if you use modern version of webpack.
Dist/umd/popper.js otherwise
@FezVrasta yahoo= ) umd version for me =) Now no error in console)Big thanks!
@FezVrasta thanks a lot
@FezVrasta i try with both but always in console i see an error
my project is with angular v7, and lasted angular-cli
using last webpack version
if i put ./node_modules/popper.js/dist/esm/popper.js" or "node_modules/popper.js/dist/esm/popper.js"

another try with "node_modules/popper.js/dist/umd/popper.js" or "./node_modules/popper.js/dist/umd/popper.js"

i will use for now firts form because lookslike a more simple error
I tried keeping both usm emd in the path of script, it's still not working for me
Most helpful comment
dist/esm/popper.js if you use modern version of webpack.
Dist/umd/popper.js otherwise