vscode debugger for chrome 调试webpack的配置问题

重点是:devtoolModuleFilenameTemplate这个配置项

module.exports = {
  entry: './app.ts',
  output: {
    filename: 'bundle.js',
    publicPath: '/assets',
    devtoolModuleFilenameTemplate: '../[resource-path]'
  },
  resolve: {
    // Add `.ts` and `.tsx` as a resolvable extension.
    extensions: ['.webpack.js', '.web.js', '.ts', '.tsx', '.js']
  },
  devtool: 'source-map',
  devServer: {
  },
  module: {
    loaders: [
      // all files with a `.ts` or `.tsx` extension will be handled by `ts-loader`
      { test: /\.tsx?$/, loader: 'ts-loader!source-map-loader' },
      { test: /\.html$/, loader: 'raw-loader'                  }
    ]
  }
}

 

posted @ 2017-01-16 21:57  air_fans  阅读(4133)  评论(0编辑  收藏  举报