Ts-loader: Sourcemaps breaks with uglify

Created on 11 Nov 2015  路  11Comments  路  Source: TypeStrong/ts-loader

I set up a simple node/express-application and tried to utilise Typescript and Webpack. Sourcemaps works fine as long as I don't add Uglify to the webpack config.

https://github.com/primavera133/tsLoader_sourcemaps

wontfix

Most helpful comment

Any updates on this ?

All 11 comments

Awesome! Thanks for this, I'll take a look.

Any updates on this ?

Any updates on this ?

I don't believe so. But I'd generally only expect uglify to be used in production builds; is there a need to use uglify when debugging?

is there a need for source maps in production? Yes, there is

That's rather surprising - source maps are expensive and you're increasing your build size by including them.

That apart - if you'd like to submit a PR that resolves this we'd certainly take a look at it.

Hi,
I had the same issue, you have to set {sourceMap: true} in uglify's configuration as well.

new webpack.optimize.UglifyJsPlugin({sourceMap: true, compress: true})

This should solve your issue.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Closing as stale. Please reopen if you'd like to work on this further.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

atrauzzi picture atrauzzi  路  5Comments

piotr-oles picture piotr-oles  路  5Comments

arcanis picture arcanis  路  5Comments

rafiek picture rafiek  路  6Comments

zombieyang picture zombieyang  路  3Comments