The project created by CRA.
utils/config.js
CONFIG={
test:'test
}
Then I imported at my src/index.js(which is root of project)
<Provider store={store}>
<Router>
<Switch>
<Route path='/' exact>
<MainContainer title={'Welcome to something'} />
</Route>
<Route path='/dummy' exact>
<DummyContainer />
</Route>
<Route path='/pop/:topicId' exact>
<Popup />
</Route>
<Route path='/app' exact>
<App />
</Route>
</Switch>
</Router>
</Provider>,
import 'utils/config';
I can access CONFIG from my component which is called from src/index.js
but error occurred that cannot access to CONFIG.
Is there anyway to put CONFIG in very first state?
THANK you.