Open justindra opened 5 years ago
Did you manage to get it to work with webpack? I am getting the following error:
aurelia.use.plugin( PLATFORM.moduleName('aurelia-mousetrap'), config => {
// Example keymap
config.set('keymap', {
"/": "KS_SEARCH"
});
})
./node_modules/aurelia-mousetrap/dist/commonjs/mousetrap-config.js
Module not found: Error: Can't resolve 'mousetrap' in '/Users/ivan/Workspace/DLAB/2019_huawei_adverts_2_UI/node_modules/aurelia-mousetrap/dist/commonjs'
@ivanbacher I added this as well in my webpack.config.js
...
plugins: [
new AureliaPlugin(),
new ModuleDependenciesPlugin({
'aurelia-mousetrap': ['./mousetrap-click', './mousetrap-focus', './mousetrap-blur']
}),
],
...
See if that works for you.
Great. Thanks for the help. I ended up just imported mousetrap the standard way.
Need to use the proper dependency stuff so webpack can import with no issues
https://github.com/aurelia/webpack-plugin/wiki/Managing-dependencies