Webpack Configuration

Installation

yarn add --develop @dlghq/dialog-scripts

Usage

const { createWebWebpackConfig } = require('@dlghq/dialog-scripts');

module.exports = (env = {}) => {
  return createWebWebpackConfig({
    root: __dirname,
    appName: 'dlg',
    version: pkg.version,
    production: env.production
  });
};

Configuration

class WebpackConfiguration

Mandatory properties:

root: string

Project root. In most cases __dirname.

appName: string

Application shortname. Will be used as css class prefixes.

version: string

Application version.

production: boolean

Should be true for production build.

Optional properties:

environment: { [key: string]: string }

Passed variables would be available in your code by process.env.VARIABLE.

override: { [key: string]: string }

Using this property you can override any file inside project