Issue 1:
Do you want to request a feature or report a bug?

documentation

What is the current behavior?

I've spent quite some time trying to figure out what is the exact configuration that is used when mode is set to production, but haven't found a clear answer yet.

I need to tweak a single config option (collapse_vars) for the UglifyJsPlugin and, as far as I see, there is no way to do it, except for setting mode to none and explicitly re-defining the whole production config, having the only difference from the default production config that UglifyJsPlugin.uglifyOptions.collapse_vars = false. But how do I know the default production config? I can't find it in the documentation, so I'm trying to find this out by trial and errors, which is totally counter-productive.

If the current behavior is a bug, please provide the steps to reproduce.

What is the expected behavior?

It would be great if on this page https://webpack.js.org/concepts/mode/, instead of some weird diffs there were full and exact configs that are equivalent to setting mode to development or production.

If this is a feature request, what is motivation or use case for changing the behavior?

The user should be able to easily copy-and-paste the default config and tweak it to their needs.

Please mention other relevant information such as the browser version, Node.js version, webpack version, and Operating System.

Issue 2:
ERROR in Entry module not found: SyntaxError: D:\ProjectPath\package.json (directory description file): SyntaxError: Unexpected token

webpack.config.js

module.exports = {
context: __dirname,
entry: 'main.ts',
output: {
path: __dirname + '/Builds/js',
filename: 'all.js'
},
resolve: {
extensions: ['', '.js', '.ts']
},
module: {
loaders: [
{
test: /\.ts$/,
loader: 'ts'
},
{
test: /\.json$/,
loader: "json"
}
]
}
};

package.json

{
"version": "1.0.0",
"name": "RevenueTracker",
"description": "A angular 2 app",
"scripts": {
"build": "webpack",
"typings": "typings",
"preinstall": "npm i -g bower",
"postinstall": "typings install"
},
"dependencies": {
"jquery": "~1.11.3",
"@angular/common": "2.0.0-rc.1",
"@angular/compiler": "2.0.0-rc.1",
"@angular/core": "2.0.0-rc.1",
"@angular/http": "2.0.0-rc.1",
"@angular/platform-browser": "2.0.0-rc.1",
"@angular/platform-browser-dynamic": "2.0.0-rc.1",
"@angular/router": "2.0.0-rc.1",
"@angular/router-deprecated": "2.0.0-rc.1",
"@angular/upgrade": "2.0.0-rc.1",
"systemjs": "0.19.26",
"es6-shim": "^0.35.0",
"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-beta.6",
"zone.js": "^0.6.12",
"highcharts": "^4.2.3",
"ng2-highcharts": "^0.3.4",
"moment": "^2.13.0"
},
"devDependencies": {
"typescript": "^1.8.0",
"typings": "^0.7.12",
"gulp": "3.9.0",
"gulp-bower": "^0.0.13",
"gulp-uglify": "1.5.1",
"gulp-concat": "2.6.0",
"gulp-sourcemaps": "1.6.0",
"require-dir": "0.3.0",
"webpack": "^1.12.14",
"webpack-merge": "^0.9.0",
"file-loader": "^0.8.5",
"ts-loader": "^0.8.1",
"json-loader": "0.5.4"
}
}

I don't find any syntax error in package.json

I am trying from a long time but the same error exist. You will notice i have given absolute path for the entry as

entry: 'main.ts',

when i give relative path (entry: './main') it gives error

ERROR in Entry module not found: Error: Cannot resolve 'file' or 'directory' ./main in D:\ProjectPath

Then it resolves the path for main.ts and finally gives the error as mentioned above.

ERROR in Entry module not found: SyntaxError: D:\ProjectPath\package.json (directory description file): SyntaxError: Unexpected token

This is very strange behavior. Please let me know if anybody found same issue and how did u resolve?

Thank you.