Skip to content

update @ngtools/webpack issuse #5607

@keyiis

Description

@keyiis

Versions.

nodejs 6.9.2
os win10x 64

Repro steps.

when i update @ngtools/webpack from 1.2.8 to 1.2.14,webpack build no error output,but nothing generate.i never change any config file before update.

The log given by the failure.

no error output

Desired functionality.

i want generate bundle js file

Mention any other details that might be useful.

webpack.aot.config.js

var webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
var webpackMerge = require('webpack-merge');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var commonConfig = require('./webpack.common.js');
var helpers = require('./helpers');
const AotPlugin = require('@ngtools/webpack').AotPlugin;

const ENV = process.env.NODE_ENV = process.env.ENV = 'production';

module.exports = webpackMerge(commonConfig, {
  entry: {
    'app': helpers.rootAngular('app/main.ts')
  },
  output: {
    path: helpers.outputBuild(),
    filename: '[name].[hash].bundle.js',
    chunkFilename: '[id].[chunkhash].chunk.js'
  },

  module: {
    loaders: [
      { test: /\.ts$/, loaders: ['@ngtools/webpack'] },
      {
        test: /\.css$/,
        exclude: helpers.rootAngular('app'),
        loader: ExtractTextPlugin.extract({ fallbackLoader: 'style-loader', loader: 'css-loader' })
      },
    ]
  },
  plugins: [
    // new OptimizeJsPlugin({
    //   sourceMap: false
    // }),
    new AotPlugin({
        tsConfigPath: helpers.root('tsconfig.aot.json'),
        entryModule: helpers.rootAngular('app/app.module#AppModule')
    }),
    new webpack.NoEmitOnErrorsPlugin(),
    new webpack.optimize.UglifyJsPlugin({
            beautify: false,
            mangle: {
                screw_ie8: true,
                keep_fnames: true
            },
            compress: {
                warnings: false,
                screw_ie8: true
            },
            comments: false
    }),
    new HtmlWebpackPlugin({
      template: helpers.rootAngular('index.html'),
      minify:{
        removeComments:true,
        collapseWhitespace: true
      }
    }),
    new ExtractTextPlugin('[name].[hash].css'),
    new webpack.DefinePlugin({
      'process.env': {
        'ENV': JSON.stringify(ENV)
      }
    })
  ]
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs: repro stepsWe cannot reproduce the issue with the information given

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions