How to use ngc-webpack - 9 common examples

To help you get started, we’ve selected a few ngc-webpack 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 r-park / soundcloud-ngrx / webpack.config.js View on Github external
new CommonsChunkPlugin({
      name: 'polyfills',
      chunks: ['polyfills']
    }),
    new CommonsChunkPlugin({
      name: 'vendor',
      chunks: ['main'],
      minChunks: module => /node_modules/.test(module.resource)
    }),
    new HtmlWebpackPlugin({
      filename: 'index.html',
      hash: false,
      inject: true,
      template: './src/index.html'
    }),
    new NgcWebpackPlugin({
      disabled: false,
      tsConfig: path.resolve('tsconfig.aot.json')
    }),
    new UglifyJsPlugin({
      comments: false,
      compress: {
        comparisons: true,
        conditionals: true,
        dead_code: true, // eslint-disable-line camelcase
        evaluate: true,
        if_return: true, // eslint-disable-line camelcase
        join_vars: true, // eslint-disable-line camelcase
        negate_iife: false, // eslint-disable-line camelcase
        screw_ie8: true, // eslint-disable-line camelcase
        sequences: true,
        unused: true,
github Ks89 / angular-webpack-skeleton / config / webpack.common.js View on Github external
*
       * Dependencies: HtmlWebpackPlugin
       */
      new HtmlElementsPlugin({
        headTags: require('./head-config.common')
      }),

      /**
       * Plugin LoaderOptionsPlugin (experimental)
       *
       * See: https://gist.github.com/sokra/27b24881210b56bbaff7
       */
      new LoaderOptionsPlugin({}),

      // do the magic to support Angular 5 (thanks to @shlomiassaf)
      new ngcWebpack.NgcWebpackPlugin(ngcWebpackConfig.plugin),

      /**
       * Plugin: InlineManifestWebpackPlugin
       * Inline Webpack's manifest.js in index.html
       *
       * https://github.com/szrenwei/inline-manifest-webpack-plugin
       */
      new InlineManifestWebpackPlugin(),


      /**
       * Plugin:
       * Manage build-time dependencies to global symbols whereas the expose-loader
       * manages runtime dependencies to global symbols
       *
       * https://webpack.js.org/plugins/provide-plugin/
github shlomiassaf / tdm / config / webpack.common.js View on Github external
*  <%= webpackConfig.htmlElements.headTags %>
       *
       * Dependencies: HtmlWebpackPlugin
       */
      new HtmlElementsPlugin({
        headTags: require('./head-config.common')
      }),

      /**
       * Plugin LoaderOptionsPlugin (experimental)
       *
       * See: https://gist.github.com/sokra/27b24881210b56bbaff7
       */
      new LoaderOptionsPlugin({}),

      new ngcWebpack.NgcWebpackPlugin(ngcWebpackConfig.plugin),
      // ServiceWorkerTsPlugin must come AFTER!!! ngc webpack plugin
      // because ServiceWorkerTsPlugin assigns the instance of the AOT plugin set on the compilation to the child
      // compilation created by ServiceWorkerWebpackPlugin
      ...ServiceWorkerTsPlugin.create(
        {
          tsconfig: 'tsconfig.server.service-worker.json'
        },
        {
          entry: helpers.root('src', 'demo', 'modules', '@http', 'server', 'index.ts')
        }
      ),

      /**
       * Plugin: InlineManifestWebpackPlugin
       * Inline Webpack's manifest.js in index.html
       *
github shlomiassaf / angular-library-starter / config / webpack.common.js View on Github external
*  <%= webpackConfig.htmlElements.headTags %>
       *
       * Dependencies: HtmlWebpackPlugin
       */
      new HtmlElementsPlugin({
        headTags: require('./head-config.common')
      }),

      /**
       * Plugin LoaderOptionsPlugin (experimental)
       *
       * See: https://gist.github.com/sokra/27b24881210b56bbaff7
       */
      new LoaderOptionsPlugin({}),

      new ngcWebpack.NgcWebpackPlugin(ngcWebpackConfig.plugin),

      /**
       * Plugin: InlineManifestWebpackPlugin
       * Inline Webpack's manifest.js in index.html
       *
       * https://github.com/szrenwei/inline-manifest-webpack-plugin
       */
      new InlineManifestWebpackPlugin(),
    ],

    /**
     * Include polyfills or mocks for various node stuff
     * Description: Node configuration
     *
     * See: https://webpack.github.io/docs/configuration.html#node
     */
github shlomiassaf / ngx-ip / config / webpack.common.js View on Github external
*  <%= webpackConfig.htmlElements.headTags %>
       *
       * Dependencies: HtmlWebpackPlugin
       */
      new HtmlElementsPlugin({
        headTags: require('./head-config.common')
      }),

      /**
       * Plugin LoaderOptionsPlugin (experimental)
       *
       * See: https://gist.github.com/sokra/27b24881210b56bbaff7
       */
      new LoaderOptionsPlugin({}),

      new ngcWebpack.NgcWebpackPlugin(ngcWebpackConfig.plugin),

      /**
       * Plugin: InlineManifestWebpackPlugin
       * Inline Webpack's manifest.js in index.html
       *
       * https://github.com/szrenwei/inline-manifest-webpack-plugin
       */
      new InlineManifestWebpackPlugin(),
    ],

    /**
     * Include polyfills or mocks for various node stuff
     * Description: Node configuration
     *
     * See: https://webpack.github.io/docs/configuration.html#node
     */
github Shyam-Chen / Angular-Starter / tools / webpack.common.js View on Github external
*  <%= webpackConfig.htmlElements.headTags %>
       *
       * Dependencies: HtmlWebpackPlugin
       */
      new HtmlElementsPlugin({
        headTags: require('./head-config.common')
      }),

      /**
       * Plugin LoaderOptionsPlugin (experimental)
       *
       * See: https://gist.github.com/sokra/27b24881210b56bbaff7
       */
      new LoaderOptionsPlugin({}),

      new ngcWebpack.NgcWebpackPlugin(ngcWebpackConfig.plugin),

      /**
       * Plugin: InlineManifestWebpackPlugin
       * Inline Webpack's manifest.js in index.html
       *
       * https://github.com/szrenwei/inline-manifest-webpack-plugin
       */
      new InlineManifestWebpackPlugin(),
    ],

    /**
     * Include polyfills or mocks for various node stuff
     * Description: Node configuration
     *
     * See: https://webpack.github.io/docs/configuration.html#node
     */

ngc-webpack

A wrapper for the @ngtools/webpack with hooks into the compilation process

MIT
Latest version published 7 years ago

Package Health Score

48 / 100
Full package analysis

Popular ngc-webpack functions