Skip to content

Commit 22a6b59

Browse files
authored
Revert change where sourcemaps were not ignored in dev. (#1728)
* Revert changes where sourcemaps were not ignored in dev, instead ignoring them across the board
1 parent cb67d25 commit 22a6b59

File tree

4 files changed

+10
-22
lines changed

4 files changed

+10
-22
lines changed

addon/ng2/models/webpack-build-common.ts

+9
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ export function getWebpackCommonConfig(projectRoot: string, sourceDir: string, o
2525
filename: '[name].bundle.js'
2626
},
2727
module: {
28+
preLoaders: [
29+
{
30+
test: /\.js$/,
31+
loader: 'source-map-loader',
32+
exclude: [
33+
/node_modules/
34+
]
35+
}
36+
],
2837
loaders: [
2938
{
3039
test: /\.ts$/,

addon/ng2/models/webpack-build-development.ts

-9
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,13 @@ const path = require('path')
44
export const getWebpackDevConfigPartial = function(projectRoot: string, sourceDir: string, outputDir: string) {
55

66
return {
7-
debug: true,
87
devtool: 'source-map',
98
output: {
109
path: path.resolve(projectRoot, outputDir),
1110
filename: '[name].bundle.js',
1211
sourceMapFilename: '[name].map',
1312
chunkFilename: '[id].chunk.js'
1413
},
15-
module: {
16-
preLoaders: [
17-
{
18-
test: /\.js$/,
19-
loader: 'source-map-loader'
20-
}
21-
]
22-
},
2314
tslint: {
2415
emitErrors: false,
2516
failOnHint: false,

addon/ng2/models/webpack-build-production.ts

-11
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,6 @@ export const getWebpackProdConfigPartial = function(projectRoot: string, sourceD
1616
sourceMapFilename: '[name].[chunkhash].bundle.map',
1717
chunkFilename: '[id].[chunkhash].chunk.js'
1818
},
19-
module: {
20-
preLoaders: [
21-
{
22-
test: /\.js$/,
23-
loader: 'source-map-loader',
24-
exclude: [
25-
/node_modules/ // don't pull in vendor sourcemaps for production builds, increased speed for build
26-
]
27-
}
28-
]
29-
},
3019
plugins: [
3120
new WebpackMd5Hash(),
3221
new webpack.optimize.DedupePlugin(),

addon/ng2/models/webpack-build-utils.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,5 @@ export const webpackDevServerOutputOptions = {
1919
hash: true,
2020
timings: true,
2121
chunks: false,
22-
chunkModules: false,
23-
warnings: false
22+
chunkModules: false
2423
}

0 commit comments

Comments
 (0)