webpackman

0.7.0 • Public • Published

webpackman

Shared webpack config files.

Install

$ npm install webpackman babel-preset-es2015 babel-preset-stage-0 -D
// webpack.config.js
module.exports = require('webpackman/webpack.config');
// webpack.config.prod.js
module.exports = require('webpackman/webpack.config.prod');
// package.json
{
  "scripts": {
    "start": "webpack-dev-server",
    "build": "rm -rf dist && webpack --config webpack.config.prod.js"
  }
}
// .babelrc
{
  "presets": ["es2015", "stage-0"]
}

Usage

$ npm start # start dev-server at localhost:8080 
$ npm run build # build to the dist folder 

Loaders

.js

babel-loader

.css

css files which have components directory in their path will be loaded as css-modules

  • **/style.css - generic css
  • **/components/**/*.css - css-modules

.html, .png, .jpeg, .gif, .json, .woff2, .ttf, .eot, .svg

static loaders

Changelog

  • v0.7.0 - hash -> chunkhash
  • v0.6.0 - remove all overloading, leave only webpack config files
  • v0.5.0 - add x-public-path
  • v0.1.0 - initial version with my opinionated react config

Used in

Tests

$ npm test
NODE_ENV=test-update npm test # update screenshots

Related

License

MIT © ewnd9

Readme

Keywords

Package Sidebar

Install

npm i webpackman

Weekly Downloads

4

Version

0.7.0

License

MIT

Last publish

Collaborators

  • ewnd9