Build Performance


First, hello Reaction Team!

Thank you for creating Reaction Commerce. I am amazed by the product and what’s behind it.
I started to build a meteor application and wanted to integrate it with Reaction Commerce.
Finally I decided to build a plugin instead of using DDP. Now I have several questions:

  1. Everytime I restart reaction or doing a reaction reset -n it takes a long time to start it. (2-3 Minutes) Is that normal? Can it be accelerated by avoiding rescanning everything again and again? The only changing part which Meteor should watch is my plugin
  2. After a change in my custom plugin it takes about 20s to reload a page. Can that in any way be accelerated? Even putting all the Ressources into a RAM Disk didn’t accelerate the buildprocess much.
  3. How can I define static ressources like images in my plugin?
  4. Is there any way I can define additional npm packages in the plugin scope?

After I see how the developement slowed a bit down, I am not sure if the plugin strategy over DDP was the right choice.

Best regards



Hello Manu,

Those are good questions.

  1. Yes, it’s normal for Reaction to take a couple of minutes to restart. It has to compile the entire project from scratch. However, it’s important to note that during development you do not need to restart Reaction to see your changes. Meteor will automatically determine that files have changed and restart the appropriate part (either client or server). This normally only takes a small fraction of the time it takes to restart (maybe 10-20 seconds)

  2. Unfortunately that’s how long it takes. I will expect that newer versions of Meteor (and Reaction) will be able to speed it up some.

  3. Right now you cannot. We would suggest putting any static images/etc in /public/custom.

  4. This is also something we are looking at doing but right now you will need to add it to the top-level package.json or just have a local package.json and run meteor npm install manually.


Just an update that the newest version of the reaction-cli now allows you to define a package.json in the plugin root. Allowing plugins to install their own npm packages.


Thank you very much for the info. I really appreciate your responsive help.


@Brent We have created a custom theme which require two npm packages so i tried to place the package.json file with required two dependencies at root level of custom plugin but reaction throwing errors on terminal (Unable to resolve some modules). It throwing errors for core dependencies. Please suggest.


You would need to provide me with more detail. We do this all the time and don’t have any issues.


1] I have created the attached package.json file by npm init command in the root directory of custom plugin

2] Then added 2 packages owl.carousel and jquery by npm install but when we run the project then it throwing the errors.

Unable to resolve some modules:

@reactioncommerce/reaction-components” in
@reactioncommerce/reaction-ui” in
@reactioncommerce/reaction-router” in

If you notice problems related to these missing modules, consider running:

meteor npm install --save @reactioncommerce/reaction-components
@reactioncommerce/reaction-ui @reactioncommerce/reaction-router

Please advice.


@Brent - Is there any other information that you need from my side?


You need to establish the babel aliases for those imports to work. Look in the package.json in the root of the project for an example

          "alias": {
            "@reactioncommerce/reaction-collections": "./imports/plugins/core/collections",
            "@reactioncommerce/reaction-components": "./imports/plugins/core/components/lib",
            "@reactioncommerce/reaction-graphql-utils": "./imports/plugins/core/graphql/server/resolvers/util",
            "@reactioncommerce/reaction-graphql-xforms": "./imports/plugins/core/graphql/server/resolvers/xforms",
            "@reactioncommerce/reaction-router": "./imports/plugins/core/router/lib",
            "@reactioncommerce/reaction-ui": "./imports/plugins/core/ui/client/components",
            "underscore": "lodash"