Meteor inject-data, how to stop inject-data?


#1

I am new to Meteor, ( have completed few projects in react redux without meteor already).

So the project i am working has a section in the head <script type="text/inject-data">

This is giving me a headache during development, as i have no clue why is the data being injected and it takes lot of time to reload during development.

The package that is used for inject data is staringatlights_inject-data.js.

To run the project i just use meteor run --port XXXX.

Any suggestion on where to look for to stop injecting data to html or other work around is much appreciated.


#2

I may have misunderstood, but if you don’t want to use the package, just do meteor remove staringatlights:inject-data


#3

All of the following packages have a direct dependency on staringatlights:inject-data.

staringatlights:fast-render
reactrouter:react-router-ssr
akryum:vue-ssr
bensventures:flow-router-ssr
akryum:vue-i18n
thelohoadmin:react-router-ssr
jconley:react-router-ssr
mighdy:flow-router-ssr
pauli:flow-router-ssr
mrmasly:vue

If you are using any of them then you’ll have inject-data installed in your project. If you are not using any of them, then it could very well be an indirect dependency.

All that being said, I’ve never had an issue with this package causing any slowness and it’s very use is to increase the perceived load time of you app.


#4

Thanks for the reply ! :smiley: For me the package was being installed due to flow router. And it seems the inject data is actually fetching datas (almost 10MB) from mongoDb and dumping/injecting itself to HTML head. So its actually a design flaw. I guess inject data is awesome !
Cheers.


#5

hey, i tried to do that but i get message as " staringatlights:inject-data is not a direct dependency in this project." probably this is not possible as it is depedent of flow router .


#6

Yeah - @copleykj has already clarified what must be happening.