Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Webpack Config or Configs?

Options
  • 03-08-2017 5:49pm
    #1
    Registered Users 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: 53,737 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