s-panferov / awesome-typescript-loader

Awesome TypeScript loader for webpack
Other
2.35k stars 179 forks source link

Error: .sourceMap is an alias for .sourceMaps, cannot use both #614

Open 0x53A opened 6 years ago

0x53A commented 6 years ago

Hi,

I'm trying to update my npm dependencies, but with the latest versions of Babel and ATS I'm getting an error:

ERROR in ./src/Client/ts/IsometricCameraKeyboardMoveInput.ts
Module build failed (from ./node_modules/awesome-typescript-loader/dist/entry.js):
Error: .sourceMap is an alias for .sourceMaps, cannot use both
    at assertNoDuplicateSourcemap (C:\Projekte\ebos\ebosYC\node_modules\@babel\core\lib\config\validation\options.js:133:11)
    at validateNested (C:\Projekte\ebos\ebosYC\node_modules\@babel\core\lib\config\validation\options.js:82:3)
    at validate (C:\Projekte\ebos\ebosYC\node_modules\@babel\core\lib\config\validation\options.js:74:10)
    at loadPrivatePartialConfig (C:\Projekte\ebos\ebosYC\node_modules\@babel\core\lib\config\partial.js:66:50)
    at loadFullConfig (C:\Projekte\ebos\ebosYC\node_modules\@babel\core\lib\config\full.js:43:39)
    at transformSync (C:\Projekte\ebos\ebosYC\node_modules\@babel\core\lib\transform.js:41:38)
    at Object.transform (C:\Projekte\ebos\ebosYC\node_modules\@babel\core\lib\transform.js:22:38)
    at C:\Projekte\ebos\ebosYC\node_modules\awesome-typescript-loader\src\index.ts:153:41
    at process._tickCallback (internal/process/next_tick.js:68:7)

after searching around a bit I found https://github.com/babel/babel-loader/issues/658.

https://github.com/loganfsmyth/babel-loader/blob/4a76597bbb45aff3a0d2104968466fc1028d61db/src/index.js#L78-L89

I skimmed the loader code a bit, and I think replacing most of the sourceMaps here with sourceMaps would solve this: https://github.com/s-panferov/awesome-typescript-loader/search?q=sourceMap&unscoped_q=sourceMap

My (failing) versions:

awesome-typescript-loader@^5.2.0:
  version "5.2.1"

"@babel/core@^7.0.0":
  version "7.1.2"