
Research
wget to Wipeout: Malicious Go Modules Fetch Destructive Payload
Socket's research uncovers three dangerous Go modules that contain obfuscated disk-wiping malware, threatening complete data loss.
vite-plugin-path-resolve
Advanced tools
这个plugin主要是解决 vue2 + webpack 迁移至 vite 中的路径问题.
case1: src/demo1/index.vue
case2: src/demo2/index.js
case3: src/demo3.vue
这在webpack是没问题的, 但是vite的话就会报错. 因为这个路径找不到对应文件
// ❌ in vite ,👌 in webpack
import demo1 from 'src/demo1'
import demo2 from 'src/demo2'
import demo3 from 'src/demo3'
to
// 🙆
import demo1 from 'src/demo1/index.vue'
import demo2 from 'src/demo2/index.js'
import demo3 from 'src/demo3.vue'
$ npm i vite-plugin-path-resolve -D
// vite.config.js
import pathResolve from 'vite-plugin-path-resolve'
function getPath(dir) {
return path.resolve(path.dirname(fileURLToPath(import.meta.url)), dir)
}
export default defineConfig({
plugins: [
pathResolve({ src: getPath('src') }),
]
})
Name | Description | Default |
---|---|---|
Object | required 需要处理的绝对路径对象集合 | null |
传入这个对象, 这个plugin将会只处理这个路径集合下的文件
请务必注意要绝对路径
FAQs
vite-plugin-path-resolve
The npm package vite-plugin-path-resolve receives a total of 2 weekly downloads. As such, vite-plugin-path-resolve popularity was classified as not popular.
We found that vite-plugin-path-resolve demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Socket's research uncovers three dangerous Go modules that contain obfuscated disk-wiping malware, threatening complete data loss.
Research
Socket uncovers malicious packages on PyPI using Gmail's SMTP protocol for command and control (C2) to exfiltrate data and execute commands.
Product
We redesigned Socket's first logged-in page to display rich and insightful visualizations about your repositories protected against supply chain threats.