Skip to content

Revert change where sourcemaps were not ignored in dev. #1728

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
9 changes: 9 additions & 0 deletions addon/ng2/models/webpack-build-common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ export function getWebpackCommonConfig(projectRoot: string, sourceDir: string, o
filename: '[name].bundle.js'
},
module: {
preLoaders: [
{
test: /\.js$/,
loader: 'source-map-loader',
exclude: [
/node_modules/
]
}
],
loaders: [
{
test: /\.ts$/,
Expand Down
9 changes: 0 additions & 9 deletions addon/ng2/models/webpack-build-development.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,13 @@ const path = require('path')
export const getWebpackDevConfigPartial = function(projectRoot: string, sourceDir: string, outputDir: string) {

return {
debug: true,
devtool: 'source-map',
output: {
path: path.resolve(projectRoot, outputDir),
filename: '[name].bundle.js',
sourceMapFilename: '[name].map',
chunkFilename: '[id].chunk.js'
},
module: {
preLoaders: [
{
test: /\.js$/,
loader: 'source-map-loader'
}
]
},
tslint: {
emitErrors: false,
failOnHint: false,
Expand Down
11 changes: 0 additions & 11 deletions addon/ng2/models/webpack-build-production.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,6 @@ 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: 1 addition & 2 deletions addon/ng2/models/webpack-build-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,5 @@ export const webpackDevServerOutputOptions = {
hash: true,
timings: true,
chunks: false,
chunkModules: false,
warnings: false
chunkModules: false
}