GithubHelp home page GithubHelp logo

Comments (5)

maletor avatar maletor commented on April 28, 2024

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.

from react-starter.

barrystaes avatar barrystaes commented on April 28, 2024

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.

from react-starter.

ivan-kleshnin avatar ivan-kleshnin commented on April 28, 2024

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

from react-starter.

pikeas avatar pikeas commented on April 28, 2024

@ivan-kleshnin Care to share your refactor?

from react-starter.

ivan-kleshnin avatar ivan-kleshnin commented on April 28, 2024

@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.

from react-starter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.