Skip to content

Instantly share code, notes, and snippets.

@gsoulavy
Forked from drejohnson/launch.json
Created May 12, 2020 13:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gsoulavy/97c77c259ce7627cf6c5e59f2dde45aa to your computer and use it in GitHub Desktop.
Save gsoulavy/97c77c259ce7627cf6c5e59f2dde45aa to your computer and use it in GitHub Desktop.
webpack-dev-server integration with vscode and typescript for react
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Debug",
"preLaunchTask": "webpack: dev server",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}",
"sourceMaps": true,
"trace": true
}
]
}
{
"scripts": {
"start": "webpack-dev-server --config ./webpack.dev.js --inline --hot"
}
}
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"label": "webpack: dev server",
"script": "start",
"promptOnClose": true,
"isBackground": true,
"problemMatcher": {
"owner": "webpack",
"severity": "error",
"fileLocation": "absolute",
"pattern": [
{
"regexp": "ERROR in (.*)",
"file": 1
},
{
"regexp": "\\((\\d+),(\\d+)\\):(.*)",
"line": 1,
"column": 2,
"message": 3
}
],
"background": {
"activeOnStart": true,
"beginsPattern": "Compiling\\.\\.\\.",
"endsPattern": "Linting complete\\."
}
}
}
]
}
// Add your other webpack stuff here...
module.exports = {
devtool: 'source-map'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment