Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions packages/angular-cli/models/webpack-build-development.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
const path = require('path');

import * as webpack from 'webpack';

declare module 'webpack' {
export interface LoaderOptionsPlugin {}
export interface LoaderOptionsPluginStatic {
new (optionsObject: any): LoaderOptionsPlugin;
}
interface Webpack {
LoaderOptionsPlugin: LoaderOptionsPluginStatic;
}
};

export const getWebpackDevConfigPartial = function(projectRoot: string, appConfig: any) {
return {
devtool: 'source-map',
Expand All @@ -21,17 +9,6 @@ export const getWebpackDevConfigPartial = function(projectRoot: string, appConfi
sourceMapFilename: '[name].map',
chunkFilename: '[id].chunk.js'
},
plugins: [
new webpack.LoaderOptionsPlugin({
options: {
tslint: {
emitErrors: false,
failOnHint: false,
resourcePath: path.resolve(projectRoot, appConfig.root)
},
}
})
],
node: {
fs: 'empty',
global: true,
Expand Down
15 changes: 10 additions & 5 deletions packages/angular-cli/models/webpack-build-production.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ const WebpackMd5Hash = require('webpack-md5-hash');
const CompressionPlugin = require('compression-webpack-plugin');
import * as webpack from 'webpack';

declare module 'webpack' {
export interface LoaderOptionsPlugin {}
export interface LoaderOptionsPluginStatic {
new (optionsObject: any): LoaderOptionsPlugin;
}
interface Webpack {
LoaderOptionsPlugin: LoaderOptionsPluginStatic;
}
}

export const getWebpackProdConfigPartial = function(projectRoot: string, appConfig: any) {
return {
devtool: 'source-map',
Expand All @@ -27,11 +37,6 @@ export const getWebpackProdConfigPartial = function(projectRoot: string, appConf
}),
new webpack.LoaderOptionsPlugin({
options: {
tslint: {
emitErrors: true,
failOnHint: true,
resourcePath: path.resolve(projectRoot, appConfig.root)
},
htmlLoader: {
minimize: true,
removeAttributeQuotes: false,
Expand Down