0.1.0 • Published 8 years ago

webpack-config-ahlechandre v0.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

webpack-config-ahlechandre

A shareable webpack config.

Install

npm install --save webpack webpack-config webpack-config-ahlechandre

Usage

Add a .babelrc file like:

{
  "presets": [
    "es2015",
    "stage-0"
  ],
  "plugins": [
    "add-module-exports",
    "transform-decorators-legacy"
  ]
}

Create the webpack.config.babel.js, define the environment variables and extends webpack-config-ahlechandre:

import Config, { environment } from 'webpack-config'

environment.setAll({
  _root: __dirname,
  _entry: 'src/app',
  _outputPath: 'assets/',
  _outputPublicPath: 'assets/',
  _outputFilenameDev: 'app',
  _outputFilenameProd: 'app.min',
})

export default new Config().extend(
  'ahlechandre'
)