N
N
Nikolai Dombrovsky2016-12-01 14:33:19
npm
Nikolai Dombrovsky, 2016-12-01 14:33:19

How to separate react module from main application?

There is a task to separate part of the application in the form of a module.
A module contains components, reducers, css (via postcss and react-css-module), etc.
Is there a way to do this outside of npm package?
And then it brings pain (any change in the module - recompile it again and restart the assembly of the main application, no automatic assembly)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
greenais, 2017-01-06
@greenais

А чем штатный js экспорт-импорт не устраивает?
//some_module.js
......
export {почтилюбойобъект}
//main_app.js
import {почтилюбойобъект} from './some_module.js'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question