react-starter
react-starter copied to clipboard
Example of a practical use of multiple entries
In order to avoid to load a gigantic javascript with all the application, in other words one entry in webpack, would be necessary to create more than one entry.
So I can't decide how should this be done in a practical use of case, for example, let's say we have an entry for a Blog application.
A built-in example should help a lot with that challenge :+1: I'm going to try to do it, but I'm really new at this stack and definitively items-store module which adds a lot of stuff to learn in to use this starter kit.
Cheers!
Any progress with this?
There is an example here: https://github.com/webpack/react-starter/blob/master/make-webpack-config.js#L10 uncommend this and add secondRoutes.js
secondStores.js
and secondStoreDescriptions.js
.
But you also need to change the server to serve the other entry on some condition, i. e. on /second/*
.
What is the ?
doing? It loads './config/app.jsx?main'. I couldn't find anything in the documentation about passing a query parameter to an entry.
It's available in the module in __resourceQuery
.