Webpack: How to load precompiled sourcemaps from node_modules

Created on 7 Aug 2015  路  3Comments  路  Source: webpack/webpack

I have a published library, transpiled from babel-code with precompiled sourcemaps:

node_modules/mylib:
index.js
index.js.map
mapTokens.js
mapTokens.js.map
plainObject.js
plainObject.js.map
Translator.js
Translator.js.map

How to teach webpack parse this maps, when i use this lib in my projet? Currently webpack builds sourcemap only for main project and not loads existing from node_modules.

Most helpful comment

All 3 comments

See https://github.com/webpack/source-map-loader

It's better to use GitHub Issues for issues with webpack only. Questions should be addressed to StackOverflow Webpack instead.

If you are trying this for react-app and you are using create-react-app please refer this link.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

karyboy picture karyboy  路  3Comments

dubrowgn picture dubrowgn  路  3Comments

adjavaherian picture adjavaherian  路  3Comments

abergs picture abergs  路  3Comments

haohcraft picture haohcraft  路  3Comments