Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Support Aurelia-Webpack Plugin #2

Open
justindra opened this issue Nov 9, 2018 · 3 comments
Open

Update to Support Aurelia-Webpack Plugin #2

justindra opened this issue Nov 9, 2018 · 3 comments

Comments

@justindra
Copy link

Need to use the proper dependency stuff so webpack can import with no issues

https://github.com/aurelia/webpack-plugin/wiki/Managing-dependencies

@ivanbacher
Copy link

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'

@justindra
Copy link
Author

@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.

@ivanbacher
Copy link

Great. Thanks for the help. I ended up just imported mousetrap the standard way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants