Skip to content

Instantly share code, notes, and snippets.

@ulitiy
Created June 27, 2016 20:34
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 ulitiy/f469b392cd2d803de93cdf7121886cf3 to your computer and use it in GitHub Desktop.
Save ulitiy/f469b392cd2d803de93cdf7121886cf3 to your computer and use it in GitHub Desktop.
VS Code debugger, breakpoints doesn't work
{
"version": "0.2.0",
"configurations": [
{
"name": "Attach with sourcemaps",
"type": "chrome",
"request": "attach",
"port": 9222,
"sourceMaps": true,
"webRoot": "${workspaceRoot}"
}
]
}
{
"compilerOptions": {
"outDir": "./dist/",
"sourceMap": true,
"noImplicitAny": true,
"module": "commonjs",
"target": "es5"
},
"files": [
"./typings/index.d.ts",
"./src/index.ts"
]
}
var webpack = require('webpack');
var PROD = (process.env.NODE_ENV === 'production')
module.exports = {
entry: "./src/index.ts",
output: {
path: "./dist",
publicPath: "/dist/",
filename: PROD ? "bundle.min.js" : "bundle.js",
},
devtool: "source-map",
resolve: {
extensions: ["", ".webpack.js", ".web.js", ".ts", ".tsx", ".js"]
},
module: {
loaders: [
{ test: /\.css$/, loader: "style!css" },
{ test: /\.tsx?$/, loader: "ts-loader" }
],
preLoaders: [
{ test: /\.js$/, loader: "source-map-loader" }
]
},
externals: {} //unify import
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment