How to use the @s-ui/bundler/webpack.config.prod.output function in @s-ui/bundler

To help you get started, we’ve selected a few @s-ui/bundler 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 SUI-Components / sui / packages / sui-widget-embedder / compiler / production.js View on Github external
)

  const entry = {app: MAIN_ENTRY_POINT}
  if (config.vendor) {
    entry['vendor'] = config.vendor
  }
  return webpack({
    ...prodConfig,
    context: path.resolve(process.cwd(), 'pages', page),
    resolve: {
      ...prodConfig.resolve,
      alias: globalConfig.alias
    },
    entry,
    output: {
      ...prodConfig.output,
      path: path.resolve(process.cwd(), 'public', page),
      publicPath: remoteCdn
        ? `${remoteCdn}/${page}/`
        : prodConfig.output.publicPath,
      jsonpFunction: `webpackJsonp-${page}`
    },
    optimization: {
      ...prodConfig.optimization,
      minimizer: [
        uglifyJsPlugin,
        new OptimizeCSSAssetsPlugin({
          cssProcessorOptions: {
            zindex: false
          }
        })
      ]
github SUI-Components / sui / packages / sui-widget-embedder / compiler / production.js View on Github external
entry['vendor'] = config.vendor
  }
  return webpack({
    ...prodConfig,
    context: path.resolve(process.cwd(), 'pages', page),
    resolve: {
      ...prodConfig.resolve,
      alias: globalConfig.alias
    },
    entry,
    output: {
      ...prodConfig.output,
      path: path.resolve(process.cwd(), 'public', page),
      publicPath: remoteCdn
        ? `${remoteCdn}/${page}/`
        : prodConfig.output.publicPath,
      jsonpFunction: `webpackJsonp-${page}`
    },
    optimization: {
      ...prodConfig.optimization,
      minimizer: [
        uglifyJsPlugin,
        new OptimizeCSSAssetsPlugin({
          cssProcessorOptions: {
            zindex: false
          }
        })
      ]
    },
    plugins: pipe(
      removePlugin('HtmlWebpackPlugin'),
      removePlugin('ScriptExtHtmlWebpackPlugin'),