Fail to load web extension in obsidian

I tried to beautify the devtools, but it seems doesn’t work. The extension works in other electron projects, and the path is correct. Can anyone find any bugs?

const session = require("@electron/remote").getCurrentWebContents().session
const path = require('path').join(
  this.app.vault.adapter.getBasePath(),
  this.app.vault.configDir,
  'plugins/obsidian-devtools-beautify/extension'
)
class DevtoolsPlugin extends require('obsidian').Plugin {
  async load() {
    console.log(path)
    await session.loadExtension(path)
  }
  onunload() {
    session.removeExtension(path)
  }
}
module.exports = DevtoolsPlugin