Need Help for integration inside an Aurelia project using Aurelia-CLI
See original GitHub issueHello,
I like your library and it use ES6 which is nice to use in my Aurelia project. However, I cannot make it to work inside my project.
I include the node_modules/material-datetime-picker/dist/js/datepicker.js
in my bundle, but when I try to create a new instance of the dateTimePicker like in your doc :
const picker = new MaterialDateTimePicker();
I get this error : TypeError: _materialDatetimePicker2.default is not a constructor
My project use Babel as transpiler and use the es2015-loose
plugin.
Could you help me to integrate this module inside my project? What could be the cause of this problem?
I think that my bundle is correct because I don’t get any error when I’m bundling my files. But the error occurs not on the import, but when I use the new MaterialDateTimePicker()
constructor.
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (4 by maintainers)
Top GitHub Comments
Thanks for your patience! The old build process had a few problems, which I have resolved. I’ll cut a
2.0.0
release in the next few days. I’ll close this issue when that is released.The
main
entry point file is a UMD file, so it works with CommonJS and AMD (and as a<script>
tag).There is also a
module
/jsnext:main
entry point for tools like rollup that support ES2015 modules directly.@jwhitfieldseed @Ganbin Works for me! 👍
Aurelia vendor bundle config: