react-starter icon indicating copy to clipboard operation
react-starter copied to clipboard

Example of a practical use of multiple entries

Open sebas5384 opened this issue 10 years ago • 4 comments

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!

sebas5384 avatar Jan 22 '15 18:01 sebas5384

Any progress with this?

pbombo avatar Jan 29 '15 17:01 pbombo

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/*.

sokra avatar Jan 29 '15 22:01 sokra

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.

maletor avatar Mar 05 '15 18:03 maletor

It's available in the module in __resourceQuery.

sokra avatar Mar 05 '15 19:03 sokra