Browse Source

Cleanup.

pull/297/head
Sebastian 8 years ago
parent
commit
68c2048543
  1. 8
      src/Squidex/app-config/webpack.run.dev.js
  2. 8
      src/Squidex/app-config/webpack.run.prod.js
  3. 2
      src/Squidex/app/app.ts
  4. 3
      src/Squidex/package.json

8
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',

8
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.
*

2
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();
}

3
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"

Loading…
Cancel
Save