Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
vite-plugin-fast-external
Advanced tools
🚀 High performance without lexical transform
🌱 Support custom external code
English | 简体中文
Like Webpack externals, support browser, Node.js and Electron
With out ast analyze, load virtual files by resolveId-hooks -- Real efficient
Support customize the code snippets by return string from function -- Real flexible 🎉
npm i vite-plugin-fast-external -D
import external from 'vite-plugin-fast-external';
export default {
plugins: [
external({
vue: 'Vue',
})
]
}
Support custom external code by function
external({
'element-ui': () => `
const E = window.ELEMENT;
export { E as default };
export const Loading = E.Loading;
export const Message = E.Message;
export const MessageBox = E.MessageBox;
export const Notification = E.Notification;
`,
// ...other element-ui members
})
Support nested module id, support return Promise
resolve({
'path/filename': () => require('fs/promises').readFile('path', 'utf-8'),
})
external(entries)
type entries = Record<string, string | ((id: string) => string | Promise<string>)>;
In fact, the plugin will intercept your module import and return the specified code snippet
Let's use external({ vue: 'Vue' })
as an example, this will get the below code
const M = window['Vue']; export { M as default }
FAQs
Out of the box, built in Vue, React, Antd, Element and others
The npm package vite-plugin-fast-external receives a total of 2 weekly downloads. As such, vite-plugin-fast-external popularity was classified as not popular.
We found that vite-plugin-fast-external 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.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.