How to use rax-webpack-plugin - 6 common examples

To help you get started, we’ve selected a few rax-webpack-plugin examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github alibaba / rax / scripts / dist-builtins.js View on Github external
// build service
  var serviceEntry = {};
  serviceEntry[entryName + '.service'] = serviceEntry[entryName + '.service.min'] = main;
  dist(getConfig(
    serviceEntry,
    {
      path: `./${dirname}/${packageName}/dist/`,
      filename: '[name].js',
      pathinfo: false,
    },
    {
      externalBuiltinModules: true,
      builtinModules: Object.assign({
        mobx: ['mobx'],
        redux: ['redux']
      }, RaxPlugin.BuiltinModules),
      moduleName: packageName,
      globalName: globalName,
      version: packagesJson.version,
    },
    babelOptions, null, null, true
  )).catch(function(err) {
    setTimeout(function() {
      throw err;
    });
  });
}
github alibaba / rax / scripts / dist-universal.js View on Github external
var entryName = packageName.split('-')[1];
    var globalName = normalizeGlobalName(packageName);

    var entry = {};
    entry[entryName] = entry[entryName + '.min'] = entry[entryName + '.factory'] = main;
    dist(getConfig(
      entry,
      {
        path: './packages/' + packageName + '/dist/',
        filename: '[name].js',
        sourceMapFilename: '[name].map',
        pathinfo: false,
      },
      {
        externalBuiltinModules: true,
        builtinModules: RaxPlugin.BuiltinModules,
        moduleName: packageName,
        globalName: globalName,
      },
      babelOptions
    ));
  });
github alibaba / rax / scripts / dist.js View on Github external
var entryName = packageName.split('-')[1];
    var globalName = normalizeGlobalName(packageName);

    var entry = {};
    entry[entryName] = entry[entryName + '.min'] = entry[entryName + '.factory'] = main;
    dist(getConfig(
      entry,
      {
        path: './packages/' + packageName + '/dist/',
        filename: '[name].js',
        sourceMapFilename: '[name].map',
        pathinfo: false,
      },
      {
        externalBuiltinModules: true,
        builtinModules: RaxPlugin.BuiltinModules,
        moduleName: packageName,
        globalName: globalName,
      },
      {
        presets: ['es2015', 'rax']
      }
    ));
  });
github alibaba / rax / packages / rax-scripts / src / config / component / webpack.config.prod.js View on Github external
}

var webpackConfigProd = getConfig(
  entry,
  {
    path: path.resolve(process.cwd(), 'dist'),
    filename: '[name].js',
    sourceMapFilename: '[name].map',
    pathinfo: false,
  },
  {
    externalBuiltinModules: true,
    builtinModules: Object.assign({
      mobx: ['mobx'],
      redux: ['redux']
    }, RaxPlugin.BuiltinModules),
    moduleName: packageName,
    globalName: globalName,
  },
  babelOptions
);

module.exports = webpackConfigProd;
github alibaba / rax / packages / rax-scripts / src / config / component / webpack.config.prod.js View on Github external
}

var webpackConfigProd = getConfig(
  entry,
  {
    path: path.resolve(process.cwd(), 'dist'),
    filename: '[name].js',
    sourceMapFilename: '[name].map',
    pathinfo: false,
  },
  {
    externalBuiltinModules: true,
    builtinModules: Object.assign({
      mobx: ['mobx'],
      redux: ['redux']
    }, RaxPlugin.BuiltinModules),
    moduleName: packageName,
    globalName: globalName,
  },
  babelOptions
);

module.exports = webpackConfigProd;
github alibaba / rax / scripts / dist-components.js View on Github external
var entry = {};
    entry[entryName] = entry[entryName + '.min'] = entry[entryName + '.factory'] = main;
    dist(getConfig(
      entry,
      {
        path: `./${PACKAGES_NAME}/${packageName}/dist/`,
        filename: '[name].js',
        sourceMapFilename: '[name].map',
        pathinfo: false,
      },
      {
        externalBuiltinModules: true,
        builtinModules: Object.assign({
          mobx: ['mobx'],
          redux: ['redux']
        }, RaxPlugin.BuiltinModules),
        moduleName: packageName,
        globalName: globalName,
      },
      babelOptions
    )).catch(function(err) {
      setTimeout(function() {
        throw err;
      });
    });
  });

rax-webpack-plugin

Webpack plugin for Rax framework.

BSD-3-Clause
Latest version published 5 years ago

Package Health Score

51 / 100
Full package analysis

Popular rax-webpack-plugin functions

Similar packages