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

Confused on what is happening on your configs #22

Open
joeyhipolito opened this issue Jan 20, 2015 · 5 comments
Open

Confused on what is happening on your configs #22

joeyhipolito opened this issue Jan 20, 2015 · 5 comments

Comments

@joeyhipolito
Copy link

Some are straight forward, but some are not, especially on production, I don't know where is the index file.. I have to resort to reading source code for learning, waaah, I hope the react-starter will improve.

Was there anyway, that you don't have to build then deploy? I can see that you have to run a command, followed by another?

Also, if I weren't using express-node for launching server, wouldn't it be good, if on production, there's a dist file, were index.html lives there, along with its resources?

@maletor
Copy link

maletor commented Mar 5, 2015

I'm in agreement. I'm more in favor of removing the dynamic features from these configs. There should be one default config and each derivation directly overrides the configuration options.

It just takes forever to read and understand what's going on.

@barrystaes
Copy link
Contributor

Does this HowStuffWorks.md file help?
#51

I agree the config files are a beast. But i also consider this the ultimate webpack example, by the webpack author actually. I'd rather learn from it than have it "dumbed down". There are plenty of simple webpack examples.

@ivan-kleshnin
Copy link

👍 Code duplication in config files is absolutely normal. Much more better than imperative instructions. Configs are meant to be compared with diff tools to inspect the difference. Here we have basically 3 presets: prod, dev and prerender squashed in one imperative obscure chunk of code. Funny thing, when I replaced all imperative statements with declarative "duplication" the overall size didn't extended too much, but transparency raised in a factor of 10. There is definitely much to learn but I bet everyone here started to learn by refactoring 😆

@pikeas
Copy link

pikeas commented Jun 12, 2015

@ivan-kleshnin Care to share your refactor?

@ivan-kleshnin
Copy link

@pikeas sure, here is raw a version https://github.com/Paqmind/starter.
Just correct retranslation of imperative syntax to declarative.

A newer variation of it is used here https://github.com/Paqmind/react-ultimate
It do not have isomorphic rendering working and some other things are disabled because of 3-rd party limitations and bugs but it should be good as a starting point anyway.

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

5 participants