/client/compatibility not loading library, what possible cause?

Hello all,

I put keypress-2.1.5.min.js (https://github.com/dmauro/Keypress) into client/compatibility/ folder but the ‘keypress’ object that suppose to be exposed but doesn’t exist.

I’m very sure it work once, but now it just doesn’t work anymore. Any idea any possible part that cause the library not loading?

Please advice, thank you.

Ok I found that when the following present at package.json, library in /client/compatibility/ doesn’t load automatically.

"meteor": {
    "mainModule": {
      "client": "client/main.js",
      "server": "server/main.js"
    "testModule": "tests/main.js"

So with meteor setting in package.json, where should I place the library file for auto load? or import is the only way? Please advice, thank you.

The meteor setting in package.json disables all auto-loading for js files.
So yes, import is the only way

1 Like