简体   繁体   中英

How to debug local NPM dependency (using `npm link`) with source-maps?

I am using babel-cli to compile my local NPM dependency source code.

package.json:

"main": "lib/index.js",
"scripts": {
    "dev": "babel src --watch -d lib --source-maps inline",
},

The local NPM dependency was referenced by my other application. Now I need npm link to debug local NPM dependency. How can I debug with source-maps?

您可以使用 webpack https://github.com/webpack-contrib/source-map-loader尝试source-map-loader

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM