text: 
  const webpack = require('webpack');
  const path = require('path');
  
  const HtmlWebpackPlugin = require('html-webpack-plugin');
  const AbsolutePathProviderPlugin = require('abspath-webpack-plugin')
  const SpritePlugin = require('svg-sprite-loader/plugin');
  const autoprefixer = require('autoprefixer');
  
  const nodeEnv = process.env.NODE_ENV || 'development';
  const isProduction = nodeEnv === 'production';
  
  const jsSourcePath = path.join(__dirname, './source/js');
  const buildPath = path.join(__dirname, './build');
  const imgPath = path.join(__dirname, './source/assets/img');
  const iconPath = path.join(__dirname, './source/assets/icons');
  const sourcePath = path.join(__dirname, './source');
  
  module.exports = {
    devtool: isProduction ? false : 'source-map',
    context: jsSourcePath,
    entry: {
      js: './index.js',
    },
    output: {
      path: buildPath,
      publicPath: '/',
      filename: 'app-[hash].js',
    },
    module: {
      rules: [
        {
          test: /\.(js|jsx)$/,
          exclude: /node_modules/,
          use: [
            'babel-loader',
          ],
        },
        {
          test: /\.(png|gif|jpg|svg)$/,
          include: iconPath,
          use: 'url-loader?limit=20480&name=assets/[name]-[hash].[ext]',
        },
      ]
    },
    plugins: [
      new SpritePlugin(),
      new webpack.DefinePlugin({
        'process.env': {
          NODE_ENV: JSON.stringify(nodeEnv),
        },
      }),
      new webpack.NamedModulesPlugin(),
      new AbsolutePathProviderPlugin(
        /^@components/,
        path.resolve('./source/js/components')
      ),
  
      new AbsolutePathProviderPlugin(
        /^@sass/,
        path.resolve('./source/sass')
      ),
  
      new AbsolutePathProviderPlugin(
        /^@utils/,
        path.resolve('./source/js/utils')
      ),
  
      new HtmlWebpackPlugin({
        template: path.join(sourcePath, 'index.html'),
        path: buildPath,
        filename: 'index.html',
      }),
      new webpack.LoaderOptionsPlugin({
        options: {
          postcss: [
            autoprefixer({
              browsers: [
                'last 3 version',
                'ie >= 10',
              ],
            }),
          ],
          context: sourcePath,
        },
      }),
    ],
    resolve: {
      extensions: ['.webpack-loader.js', '.web-loader.js', '.loader.js', '.js', '.jsx'],
      modules: [
        path.resolve(__dirname, 'node_modules'),
        jsSourcePath,
      ]
    },
    devServer: {
      contentBase: isProduction ? sourcePath : sourcePath,
      historyApiFallback: true,
      port: 3000,
      compress: isProduction,
      inline: !isProduction,
      hot: !isProduction,
      host: '0.0.0.0',
      disableHostCheck: true,
    },
  }