我试图让Visual Studio代码启动webpack的"webpack-dev-server"命令,但无论我在launch.json中使用什么配置,我都会收到错误.
我目前的launch.json看起来像这样:
{ "version": "0.2.0", "configurations": [ { "name": "Launch", "type": "node", "request": "launch", "program": "./node_modules/.bin/webpack-dev-server.cmd", "stopOnEntry": false, "args": ["-d --hot --inline"], "cwd": ".", "runtimeExecutable": null, "runtimeArgs": [], "env": { "NODE_ENV": "development" }, "externalConsole": false, "sourceMaps": true, "outDir": "null" }, { "name": "Attach", "type": "node", "request": "attach", "port": 5858 } ] }
目前的错误是:
cannot launch program 'c:\ftct\node_modules\.bin\webpack-dev-server.cmd'; setting the 'outDir' attribute might help
我已经尝试将outDir设置为某个值或其他值,但它仍抱怨设置此属性.
有任何想法吗?这就是我从Visual Studio 2015迁移到Visual Studio Code的最后障碍!