4 ms·
It has two webpack configs (one for dev, one for production), how do you indicate which one you are using when you run webpack?
by nanoojaboo 11y ago
It has two webpack configs (one for dev, one for production), how do you indicate which one you are using when you run webpack?
- hakanito 11y agoCheck the package.json, there are several npm scripts. The author of this library probably wants you to run `npm run start` for development and `npm run serve` for production
- callumlocke 11y agoDevelopment: npm start Production: npm run build
- mxstbr 11y agohakanito is spot on, I just wanted to add that there's a COMMANDS.md[0] with all the possible npm commands! I take care of running webpack with the right envs, linting and building your application, you use the npm commands and write a great app! [0]: See: https://github.com/mxstbr/react-boilerplate/blob/master/docs/COMMANDS.md https://github.com/mxstbr/react-boilerplate/blob/master/docs...
- brianzelip 11y agoIt's worth noting here that "production" is not for literally serving your app. Rather it's used here to provide a production-like build of your app that can be tested on multiple devices before actually deploying it online.