Created
February 8, 2018 21:59
-
-
Save ferdiemmen/2adf128ce23252abfc25e958541ace9e to your computer and use it in GitHub Desktop.
ES6 to ES5 packages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
i solved the same issue recently for this module and others like --> ngx translate and more... | |
solution (compile the js files into es2015): | |
npm i --save -dev babel-cli babel-preset-es2015 | |
add this to the root project under the name .babelrc | |
{ "presets": ["es2015"] } | |
add a npm script in package.json in "scrtipsts" scope | |
"compile_@agm_core": "babel node_modules/@agm/core -d node_modules/@agm/core --presets es2015", | |
add a postinstall script in package.json in "scrtipsts" scope | |
"postinstall": "npm run compile_@agm_core", | |
run npm i to install the deps. After installing the deps, the script postinstall will run and babel will compile the targeted js files | |
run your server and should world | |
Give me please feedback if it works. I did the same thins for more than 3 npm modules it works on my machine :D |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment