981377660LMT / ts

ts学习
6 stars 1 forks source link

code-inspector-plugin #515

Open 981377660LMT opened 5 months ago

981377660LMT commented 5 months ago

https://inspector.fe-dev.cn/guide/introduction.html

981377660LMT commented 4 months ago

注意:可能无法跳转到文件位置,此时需要在 .env.local 中配置编辑器绝对路径

CODE_EDITOR=/Users/liaomingtian/Downloads/Visual Studio Code-2.app/Contents/MacOS/Electron
981377660LMT commented 4 months ago
chainWebpack: (config) => {
    config.plugin('code-inspector-plugin').use(
      codeInspectorPlugin({
        bundler: 'webpack',
        editor: 'code',
        importClient: 'code',
        hooks: {
          afterInspectRequest: (_options, source) => {
            console.log({ source });
          }
        }
      })
    );

    return config;
  }