Product
Socket Now Supports uv.lock Files
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
webpack-code-inspector-plugin
Advanced tools
点击页面上的元素,将自动打开你的代码编辑器并将光标定位到元素对应的代码位置。
npm i webpack-code-inspector-plugin -D
# or
yarn add webpack-code-inspector-plugin -D
# or
pnpm add webpack-code-inspector-plugin -D
vue.config.js
或 webpack.config.js
如果你使用的是 vue.config.js
, 添加如下配置:
// vue.config.js
const WebpackCodeInspectorPlugin = require('webpack-code-inspector-plugin');
module.exports = {
// ...other code
chainWebpack: (config) => {
// add this configuration in the development environment
config
.plugin('webpack-code-inspector-plugin')
.use(new WebpackCodeInspectorPlugin());
},
};
如果你使用的是 webpack.config.js
, 添加如下配置:
// webpack.config.js
const WebpackCodeInspectorPlugin = require('webpack-code-inspector-plugin');
module.exports = (env = {}) => ({
plugins: [new WebpackCodeInspectorPlugin()],
});
如果你的编辑器是 VSCode,需要进行如下配置:
在 VSCode 中执行 command + shift + p
(mac) 或 ctrl + shift + p
(windows) 命令, 搜索 指令并点击 shell Command: Install 'code' command in Path
:
如果出现如下弹窗,说明配置成功了:
目前是有代码审查功能的方式有两种:
当代码审查模式打开时,点击页面上的元素,将自动打开你的代码编辑器并将光标定位到元素对应的代码位置。
参数 | 描述 | 类型 | 可选值 | 默认值 |
---|---|---|---|---|
hideSwitch | 是否隐藏功能开关 | boolean | true/false | false |
hotKeys | 组合键触发功能,为 false 或者空数组则关闭组合键触发 | string[] | false | Array<'ctrlKey' |'altKey' |'metaKey' |'shiftKey' > | false | ['altKey', 'shiftKey'] |
autoToggle | After opening the function button, whether automatically close the button when triggering the jump editor | boolean | true/false | true |
// webpack.config.js
const WebpackCodeInspectorPlugin = require('webpack-code-inspector-plugin');
module.exports = (env = {}) => ({
plugins: [
new WebpackCodeInspectorPlugin({
hideSwitch: false,
hotKeys: ['altKey', 'shiftKey'],
autoToggle: true,
}),
],
});
.env.local
的文件并添加如下内容:
# editor
CODE_EDITOR=code
FAQs
Click the dom on the page, it will open your IDE and position the cursor to the source code location of the dom.
The npm package webpack-code-inspector-plugin receives a total of 13,548 weekly downloads. As such, webpack-code-inspector-plugin popularity was classified as popular.
We found that webpack-code-inspector-plugin demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.