text: const path                        = require('path');
  const webpack                     = require('webpack');
  const CaseSensitivePathsPlugin    = require('case-sensitive-paths-webpack-plugin');
  const HippyDynamicImportPlugin    = require('@hippy/hippy-dynamic-import-plugin');
  const pkg                         = require('../package.json');
  const manifest                    = require('../dist/ios/vendor-manifest.json');
  
  
  const platform = 'ios';
  
  module.exports = {
    mode: 'production',
    bail: true,
    entry: {
      index: ['regenerator-runtime', path.resolve(pkg.main)],
    },
    output: {
      filename: `[name].${platform}.js`,
      path: path.resolve(`./dist/${platform}/`),
      globalObject: '(0, eval)("this")',
    },
    plugins: [
      new webpack.NamedModulesPlugin(),
      new webpack.DefinePlugin({
        'process.env.NODE_ENV': JSON.stringify('production'),
        __PLATFORM__: JSON.stringify(platform),
      }),
      new CaseSensitivePathsPlugin(),
      new webpack.DllReferencePlugin({
        context: path.resolve(__dirname, '..'),
        manifest,
      }),
      new HippyDynamicImportPlugin(),
    ],
    module: {
      rules: [
        {
          test: /\.(jsx?)$/,
          use: [
            {
              loader: 'babel-loader',
              options: {
                presets: [
                  '@babel/preset-react',
                  [
                    '@babel/preset-env',
                    {
                      targets: {
                        ios: 8,
                      },
                    },
                  ],
                ],
                plugins: [
                  '@babel/plugin-proposal-class-properties',
                ],
              },
            },
            'unicode-loader',
          ],
        },
        {
          test: /\.(png|jpg|gif)$/,
          use: [{
            loader: 'file-loader',
            options: {
              name: '[name].[ext]',
              outputPath: 'assets/',
            },
          }],
        },
      ],
    },
    resolve: {
      extensions: ['.js', '.jsx', '.json'],
    },
  };
  