forked from primefaces/primeng
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Çağatay Çivici
committed
Mar 15, 2017
1 parent
dd61e16
commit 10f360d
Showing
8 changed files
with
70 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
var path = require('path'); | ||
|
||
var _root = path.resolve(__dirname, '..'); | ||
|
||
function root(args) { | ||
args = Array.prototype.slice.call(arguments, 0); | ||
return path.join.apply(path, [_root].concat(args)); | ||
} | ||
|
||
exports.root = root; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,37 @@ | ||
var webpack = require('webpack'); | ||
var webpackMerge = require('webpack-merge'); | ||
var commonConfig = require('./webpack.common.js'); | ||
var helpers = require('./helpers'); | ||
|
||
const ENV = process.env.NODE_ENV = process.env.ENV = 'production'; | ||
|
||
module.exports = webpackMerge(commonConfig, { | ||
devtool: 'source-map', | ||
|
||
output: { | ||
path: helpers.root('dist'), | ||
publicPath: '/', | ||
filename: '[name].[hash].js', | ||
chunkFilename: '[id].[hash].chunk.js' | ||
}, | ||
|
||
plugins: [ | ||
new webpack.NoErrorsPlugin(), | ||
new webpack.optimize.DedupePlugin(), | ||
new webpack.optimize.UglifyJsPlugin({ | ||
beautify: false, | ||
mangle: {screw_ie8: true, keep_fnames: true}, | ||
compress: {screw_ie8: true}, | ||
comments: false, | ||
compressor: { | ||
warnings: false | ||
} | ||
}), | ||
new webpack.DefinePlugin({ | ||
'process.env': { | ||
'ENV': JSON.stringify(ENV) | ||
} | ||
}) | ||
new webpack.NoEmitOnErrorsPlugin(), | ||
new webpack.optimize.UglifyJsPlugin({ // https://github.com/angular/angular/issues/10618 | ||
mangle: { | ||
keep_fnames: true | ||
} | ||
}), | ||
new ExtractTextPlugin('[name].[hash].css'), | ||
new webpack.DefinePlugin({ | ||
'process.env': { | ||
'ENV': JSON.stringify(ENV) | ||
} | ||
}), | ||
new webpack.LoaderOptionsPlugin({ | ||
htmlLoader: { | ||
minimize: false // workaround for ng2 | ||
} | ||
}) | ||
] | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,11 @@ | ||
import 'core-js/es6/symbol'; | ||
import 'core-js/es6/object'; | ||
import 'core-js/es6/function'; | ||
import 'core-js/es6/parse-int'; | ||
import 'core-js/es6/parse-float'; | ||
import 'core-js/es6/number'; | ||
import 'core-js/es6/math'; | ||
import 'core-js/es6/string'; | ||
import 'core-js/es6/date'; | ||
import 'core-js/es6/array'; | ||
import 'core-js/es6/regexp'; | ||
import 'core-js/es6/map'; | ||
import 'core-js/es6/set'; | ||
import 'core-js/es6/weak-map'; | ||
import 'core-js/es6/weak-set'; | ||
import 'core-js/es6/typed'; | ||
import 'core-js/es6/reflect'; | ||
import 'core-js/es6'; | ||
import 'core-js/es7/reflect'; | ||
import 'zone.js/dist/zone'; | ||
require('zone.js/dist/zone'); | ||
|
||
if (process.env.ENV === 'production') { | ||
// Production | ||
} else { | ||
// Development and test | ||
Error['stackTraceLimit'] = Infinity; | ||
require('zone.js/dist/long-stack-trace-zone'); | ||
} |