Last active
January 5, 2020 00:56
-
-
Save Legends/89ee9849c31ea0a7ad95132b1a8357ed to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ############################################## DEBUG YOUR WEBPACK-DEV-SERVER BUILD | |
| launch.json (Debug->Add Configuration->Node): | |
| { | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "type": "node", | |
| "request": "launch", | |
| "name": "Launch Program", | |
| // "skipFiles": [ | |
| // "<node_internals>/**" | |
| // ], | |
| "program": "${workspaceFolder}/node_modules/webpack-dev-server/bin/webpack-dev-server", //<-- POINTS TO WEBPACK-DEV-SERVER | |
| "args": [ | |
| "--config", | |
| "webpack.config.dev.js" // PROD/DEV | |
| ], | |
| "autoAttachChildProcesses": true, | |
| "stopOnEntry": true | |
| } | |
| ] | |
| } | |
| // ############################################## DEBUG YOUR WEBPACK BUILD DEV/PROD | |
| launch.json (Debug->Add Configuration->Node): | |
| { | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "type": "node", | |
| "request": "launch", | |
| "name": "Launch Program", | |
| // "skipFiles": [ | |
| // "<node_internals>/**" | |
| // ], | |
| "program": "${workspaceFolder}/node_modules/webpack/bin/webpack", // <-- POINTS TO WEBPACK | |
| "args": [ | |
| "--config", | |
| "webpack.config.dev.js" // <-- dev or prod build | |
| ], | |
| "autoAttachChildProcesses": true, | |
| "stopOnEntry": true | |
| } | |
| ] | |
| } | |
| // ############################################## DEBUG YOUR WEBPACK BUILD DEV/PROD USING CHROME BROWSER ENVIRONMENT | |
| package.json | |
| scripts{ | |
| "debug": "node --inspect --inspect-brk ./node_modules/webpack/bin/webpack.js --verbose --display-error-details --config webpack.config.dev.js", | |
| } | |
| console:--> yarn debug |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment