Extensible, opinionated, doctor approved webpack configuration

Downloads in past


1.6.24 years ago6 years agoMinified + gzip package size for medpack in KB


⛑ Medpack npm version Build Status codecov
Zero-to-slim config webpack wrapper

Table of Contents

- Installation - Usage - Commands - Hot Reloading


$ yarn add --dev medpack
$ npm install --save-dev medpack


Medpack just works out of the box. If you need more flexibility, add a medpack.js config file to the root of your directory:
import medpack from 'medpack'

export default medpack({
  paths: {
    appPath: './src/entry.js',
  env: {
    SHOW_DEBUG: true,
  webpack: config => {
    config.entry = ['src/random.js', ...config.entry];

    return config;


  • medpack start - Spins up your local development server with hot reloading enabled
  • medpack build - Creates a production-optimized build ready to be distributed
  • medpack 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.js
import { hot } from 'react-hot-loader/root'
const App = () => <div>Hello World!</div>
export default hot(App);

Note: in production, hot does nothing and just passes App through.