Skip to content
This repository has been archived by the owner on Jan 16, 2018. It is now read-only.

Example of a practical use of multiple entries #26

Open
sebas5384 opened this issue Jan 22, 2015 · 4 comments
Open

Example of a practical use of multiple entries #26

sebas5384 opened this issue Jan 22, 2015 · 4 comments

Comments

@sebas5384
Copy link

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 👍
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!

@pbombo
Copy link

pbombo commented Jan 29, 2015

Any progress with this?

@sokra
Copy link
Member

sokra commented Jan 29, 2015

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

@maletor
Copy link

maletor commented Mar 5, 2015

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.

@sokra
Copy link
Member

sokra commented Mar 5, 2015

It's available in the module in __resourceQuery.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants