How to use native client-side libraries in Meteor?

淺唱寂寞╮ 提交于 2019-11-29 05:07:14

You shouldn't manually mess with files in .meteor directory (except for packages and release files), that's where Meteor puts its compiled files. All libraries should go to source folder - so basically anywhere else.

I assume those are client-side libraries.

In that case, put them:

  • in /client if it doesn't matter when they are loaded and they happen to work there;
  • in /client/lib if you need to load them before the rest of the code;
  • in /client/compatibility if the code is not prepared to work with Meteor and you don't want to / don't know how to fix it;
  • in /client/lib/compatibility if both of the above conditions occur. I'd recommend to put them here on the beginning just to be safe.

If you want to load HTML/CSS/JS files dynamically to your meteor application then you can use: Meteor-external-file-loader

Add Meteor-external-file-loader to your meteor app by typing in console:

meteor add mrt:external-file-loader

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!