Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Webpack Config or Configs?

  • 03-08-2017 05:49PM
    #1
    Registered Users, Registered Users 2 Posts: 1,298 ✭✭✭


    One thing i've noticed while looking at some apps that are being built using webpack is that they either use one file with ternary operators that allow them to run all their configs from the process variables and that's grand, other projects i've seen with wp.dev, wp.prod, wp.common etc... so my question is what's the best way to skin a bear? Multiple or single files?


Comments

  • Administrators Posts: 55,338 Admin ✭✭✭✭✭awec


    I would probably split them if the files were large or varied a lot between environments.

    If they are exactly the same except for one small section I'd probably have 1 file and check the environment within it. For example, if the only difference is you minify your prod one then it's probably not worth a prod specific file.


Advertisement