webpack-contrib / terser-webpack-plugin

Terser Plugin
MIT License
1.94k stars 158 forks source link

Unhandled rejection Error: "." is not in the SourceMap. #118

Closed guillaumebriday closed 5 years ago

guillaumebriday commented 5 years ago

Expected Behavior

Compile without the rejection Error.

I have no idea how to debug it and I don't find any mentions of a breaking change or issue.

Actual Behavior

I have this error thrown in version > 1.4 but it works perfectly in 1.3. The code remains the same.

Unhandled rejection Error: "." is not in the SourceMap.
    at BasicSourceMapConsumer.SourceMapConsumer_sourceContentFor [as sourceContentFor] (/Users/guillaumebriday/Sites/todolist-frontend-vuejs/node_modules/source-map/lib/source-map-consumer.js:753:13)
    at /Users/guillaumebriday/Sites/todolist-frontend-vuejs/node_modules/terser-webpack-plugin/node_modules/webpack-sources/lib/applySourceMap.js:134:44

Travis builds: ✅ 1.3 => https://travis-ci.org/guillaumebriday/todolist-frontend-vuejs/builds/570607584 ❌ 1.4 => https://travis-ci.org/guillaumebriday/todolist-frontend-vuejs/builds/570621121

Travis is green in both builds because even with errors the command exists with 0. Don't know why.

Code

The project is open source: https://github.com/guillaumebriday/todolist-frontend-vuejs

How Do We Reproduce?

You can clone the repo and try with both versions with the command: yarn production

Thank you!

alexander-akait commented 5 years ago

use latest terser-webpack-plugin and run yarn upgrade, you have many old deps