Reputation: 671
I would like to debug the webpack scripts , not the produced app !
How can I configure the build scripts to be launched / used by a node debugger such as devtool ?
Upvotes: 2
Views: 181
Reputation: 32972
The webpack binary you run is just JavaScript, so you can debug it like any other script you run. When you install webpack, a symlink ./node_modules/.bin/webpack
is added that refers to webpack.js. You can run the node debugger with:
node debug ./node_modules/.bin/webpack [options]
Or if you want to use Chrome devtools you add the --inspect
flag:
node debug --inspect ./node_modules/.bin/webpack [options]
Upvotes: 2