⛑ Medpack
Zero-to-slim config webpack wrapper
Table of Contents
Installation
$ yarn add --dev medpack$ npm install --save-dev medpack
Usage
Medpack just works out of the box. If you need more flexibility, add a medpack.js
config file to the root of your directory:
paths: appPath: './src/entry.js' env: SHOW_DEBUG: true { configentry = 'src/random.js' ...configentry; return config; }
Commands
medpack start
- Spins up your local development server with hot reloading enabledmedpack build
- Creates a production-optimized build ready to be distributedmedpack test
- Runs your tests with jest
Hot Reloading
Medpack uses react-hot-loader under the hood . Opt-in to hot reloading by wrapping your top most component with the hot
HOC.
// App.jsimport hot from 'react-hot-loader/root'const App = <div>Hello World!</div>App;
Note: in production,
hot
does nothing and just passes App through.