Skip to content

Feature/silence sourcemap warnings for vendors #1673

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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
10 changes: 0 additions & 10 deletions addon/ng2/models/webpack-build-common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,6 @@ export function getWebpackCommonConfig(projectRoot: string, sourceDir: string) {
filename: '[name].bundle.js'
},
module: {
preLoaders: [
{
test: /\.js$/,
loader: 'source-map-loader',
exclude: [
path.resolve(projectRoot, 'node_modules/rxjs'),
path.resolve(projectRoot, 'node_modules/@angular'),
]
}
],
loaders: [
{
test: /\.ts$/,
Expand Down
8 changes: 8 additions & 0 deletions addon/ng2/models/webpack-build-development.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ export const getWebpackDevConfigPartial = function(projectRoot: string, sourceDi
sourceMapFilename: '[name].map',
chunkFilename: '[id].chunk.js'
},
module: {
preLoaders: [
{
test: /\.js$/,
loader: 'source-map-loader'
}
]
},
tslint: {
emitErrors: false,
failOnHint: false,
Expand Down
11 changes: 11 additions & 0 deletions addon/ng2/models/webpack-build-production.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@ export const getWebpackProdConfigPartial = function(projectRoot: string, sourceD
sourceMapFilename: '[name].[chunkhash].bundle.map',
chunkFilename: '[id].[chunkhash].chunk.js'
},
module: {
preLoaders: [
{
test: /\.js$/,
loader: 'source-map-loader',
exclude: [
/node_modules/ // don't pull in vendor sourcemaps for production builds, increased speed for build
]
}
]
},
plugins: [
new WebpackMd5Hash(),
new webpack.optimize.DedupePlugin(),
Expand Down
3 changes: 2 additions & 1 deletion addon/ng2/models/webpack-build-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ export const webpackDevServerOutputOptions = {
hash: true,
timings: true,
chunks: false,
chunkModules: false
chunkModules: false,
warnings: false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't that going to remove all warnings? Is there a way to specifically remove source-maps warnings?

}