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(,,
class DevtoolsPlugin extends require('obsidian').Plugin {
  async load() {
    await session.loadExtension(path)
  onunload() {
module.exports = DevtoolsPlugin