Skip to content

Instantly share code, notes, and snippets.

@mohamedmansour
Created October 24, 2018 22:11
Show Gist options
  • Save mohamedmansour/45c44c25f395d9d5fdcaaef7a6a0455a to your computer and use it in GitHub Desktop.
Save mohamedmansour/45c44c25f395d9d5fdcaaef7a6a0455a 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