
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
vite-code-inspector-plugin
Advanced tools
点击页面上的元素,将自动打开你的代码编辑器并将光标定位到元素对应的代码位置。
npm i vite-code-inspector-plugin -D
# or
yarn add vite-code-inspector-plugin -D
# or
pnpm add vite-code-inspector-plugin -D
vite.config.js
在 vite.config.js
中添加如下配置:
// vite.config.js
import { defineConfig } from 'vite';
import { ViteCodeInspectorPlugin } from 'vite-code-inspector-plugin';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [ViteCodeInspectorPlugin()],
});
如果你的编辑器是 VSCode,需要进行如下配置:
在 VSCode 中执行 command + shift + p
(mac) 或 ctrl + shift + p
(windows) 命令, 搜索 指令并点击 shell Command: Install 'code' command in Path
:
如果出现如下弹窗,说明配置成功了:
目前是有代码审查功能的方式有两种:
当代码审查模式打开时,点击页面上的元素,将自动打开你的代码编辑器并将光标定位到元素对应的代码位置。
参数 | 描述 | 类型 | 可选值 | 默认值 |
---|---|---|---|---|
showSwitch | 是否展示功能开关 | boolean | true/false | false |
hotKeys | 组合键触发功能,为 false 或者空数组则关闭组合键触发 | string[] | false | Array<'ctrlKey' |'altKey' |'metaKey' |'shiftKey' > | false | ['altKey', 'shiftKey'] |
autoToggle | 打开功能开关后,点击触发跳转编辑器时是否自动关闭开关 | boolean | true/false | true |
// vite.config.js
import { defineConfig } from 'vite';
import { ViteCodeInspectorPlugin } from 'vite-code-inspector-plugin';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
ViteCodeInspectorPlugin({
showSwitch: 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.
We found that vite-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.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.