zoukankan      html  css  js  c++  java
  • vscode debugger for chrome 调试webpack的配置问题

    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'                  }
        ]
      }
    }


    VSCODE 配置launch.json文件
    {
        // 使用 IntelliSense 了解相关属性。
        // 悬停以查看现有属性的描述。
        // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
        "version": "0.2.0",
        "configurations": [{
            "type": "chrome",
            "request": "launch",
            "name": "vuejs: chrome",
            "url": "http://localhost:8080",
            "webRoot": "${workspaceFolder}/src",
            "breakOnLoad": true,
            "sourceMapPathOverrides": {
                "webpack:///src/*": "${webRoot}/*"
            }
        }]
    }

    重点是:devtoolModuleFilenameTemplate这个配置项
  • 相关阅读:
    C++设计模式 ==> 装饰(者)模式
    基于路由器的VRRP技术--VRRP的应用
    基于路由器的VRRP技术--VRRP的应用
    C++设计模式 ==> 策略模式与简单工厂模式结合
    C++设计模式 ==> 简单工厂模式
    DVWA之Insecure Captcha
    DVWA之Insecure Captcha
    DVWA之File Inclusion
    DVWA之File Inclusion
    DVWA之XSS
  • 原文地址:https://www.cnblogs.com/zzsdream/p/10061017.html
Copyright © 2011-2022 走看看