unipack

0.1.0 • Public • Published

unipack

NPM version NPM downloads CircleCI donate

Install

yarn add unipack

# peer dependencies
yarn add webpack webpack-dev-server

Usage

const webpack = require('webpack')
const unipack = require('unipack')

const pack = unipack({
  serverCompiler: webpack(serverWebpackConfig)
  clientCompiler: webpack(clientWebpackConfig),
})

// Built both
pack.build()

// Run both in dev mode
// Run server compiler in watch mode
// Run client compiler with a dev server
pack.start({
  host,
  port,
  devServerOptions,
  watchOption
})

// Then you will have:
pack.devServer // express app
pack.devServerInstance // `net.Server` instance

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

unipack © egoist, Released under the MIT License.
Authored and maintained by egoist with help from contributors (list).

egoist.moe · GitHub @egoist · Twitter @_egoistlily

Readme

Keywords

none

Package Sidebar

Install

npm i unipack

Weekly Downloads

2

Version

0.1.0

License

MIT

Last publish

Collaborators

  • rem