In the process industry markets are facing new challenges: while product life cycles are becoming shorter, the differentiation of products grows. This leads to varying and uncertain product demands in time and location. As a reaction, the research focus shifts to modular production, which allow for a more flexible production network. Using small-scale plants, production locations can be located in direct proximity to resources or customers. In response to short-term demand changes, capacity modifications can be made by shifting modular units between locations or numbering up. In order to benefit from the flexibility of modular production, the structure of the network requests dynamic adaptions in every period. Subsequently, once the customer demand realizes, an optimal match between disposed production capacities and customer orders has to be determined. This decision situation imposes new challenges on planning tools, since frequent adjustments of the network configuration have to be computed based on uncertain demand. We develop stochastic and robust mixed-integer programming formulations to hedge against demand uncertainty. In a computational study the novel formulations are evaluated based on adjusted real-world data sets in terms of runtime and solution quality.