diff --git a/src/Squidex/app-config/webpack.run.dev.js b/src/Squidex/app-config/webpack.run.dev.js index 55d568cad..aaaa58e07 100644 --- a/src/Squidex/app-config/webpack.run.dev.js +++ b/src/Squidex/app-config/webpack.run.dev.js @@ -5,14 +5,6 @@ module.exports = webpackMerge(runConfig, { mode: 'development', - - /** - * Developer tool to enhance debugging - * - * See: https://webpack.js.org/configuration/devtool/#devtool - * See: https://webpack.js.org/guides/build-performance/ - */ - devtool: 'cheap-module-source-map', output: { filename: '[name].js', diff --git a/src/Squidex/app-config/webpack.run.prod.js b/src/Squidex/app-config/webpack.run.prod.js index bec371193..ceae12310 100644 --- a/src/Squidex/app-config/webpack.run.prod.js +++ b/src/Squidex/app-config/webpack.run.prod.js @@ -5,14 +5,10 @@ ExtractTextPlugin = require('extract-text-webpack-plugin'), runConfig = require('./webpack.run.base.js'), helpers = require('./helpers'); -var ENV = process.env.NODE_ENV = process.env.ENV = 'production'; - helpers.removeLoaders(runConfig, ['scss', 'ts']); module.exports = webpackMerge(runConfig, { mode: 'production', - - devtool: 'source-map', output: { /** @@ -86,10 +82,6 @@ module.exports = webpackMerge(runConfig, { }, plugins: [ - new webpack.NoEmitOnErrorsPlugin(), - new webpack.DefinePlugin({ 'process.env': { 'ENV': JSON.stringify(ENV) } }), - new webpack.optimize.ModuleConcatenationPlugin(), - /* * Puts each bundle into a file and appends the hash of the file to the path. * diff --git a/src/Squidex/app/app.ts b/src/Squidex/app/app.ts index d1370c11f..cefb6fb49 100644 --- a/src/Squidex/app/app.ts +++ b/src/Squidex/app/app.ts @@ -21,7 +21,7 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import { AppModule } from './app.module'; -if (process.env.ENV === 'production') { +if (process.env.NODE_ENV === 'production') { enableProdMode(); } diff --git a/src/Squidex/package.json b/src/Squidex/package.json index e3fa5b2b2..7636fabd2 100644 --- a/src/Squidex/package.json +++ b/src/Squidex/package.json @@ -9,8 +9,7 @@ "test:coverage": "karma start karma.coverage.conf.js", "test:clean": "rimraf _test-output", "dev": "cpx node_modules/oidc-client/dist/oidc-client.min.js wwwroot/scripts/ && webpack-dev-server --config app-config/webpack.run.dev.js --inline --port 3000", - "build": "webpack --config app-config/webpack.run.prod.js --display-error-details --bail --display-optimization-bailout", - "build:nobail": "webpack --config app-config/webpack.run.prod.js --display-error-details", + "build": "webpack --config app-config/webpack.run.prod.js", "build:copy": "cpx node_modules/oidc-client/dist/oidc-client.min.js wwwroot/scripts/", "build:clean": "rimraf wwwroot/build", "tslint": "tslint -c tslint.json -p tsconfig.json app/**/*.ts"