I'm new to meteor.js
.
I started a new app using meteor create textcircle
. I then added a package using meteor add edemaine:sharejs-codemirror
The problem is, in my app directory, I created a folder, lib
, then a file lib/collections.js
. Inside lib/collections.js
I have this single line console.log('Lib folder loaded')
. But I don't see the text on the console. Not in google chrome console, neither in my terminal. This shows that the file is clearly not loaded. Any thoughts would be appreciated.
meteor --version
outputs Meteor 1.8
you need to import your files in client oder server main.js.
Lets assume you have also a folder named client.
inside that folder there is a file main.js.
import '../lib/collections.js';
Now your browsers console should show up the log.
If you have also a folder server and inside a file main.js
import '../lib/collections.js';
You will see the log also on your meteors console log.
Hope that helps Tom
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.