![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
vite-plugin-fast-external
Advanced tools
Readme
đ High performance without lexical transform
đą Support custom external code
đĻ Built in Vue, React, Antd, Element and others, Out of the box
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',
}),
],
}
You can easily use some builtin modules
import external from 'vite-plugin-fast-external'
import {
antd_vue_v1,
antd_vue_v3,
antd_v4,
element_plus,
element_ui,
react_dom_v17,
react_dom_v18,
react_v17,
react_v18,
vue_composition_api,
vue_v2,
vue_v3,
} from 'vite-plugin-fast-external/presets'
export default {
plugins: [
external({
'ant-design-vue': antd_vue_v3,
antd: antd_v4,
'element-plus': element_plus,
'element-ui': element_ui,
'react-dom/client': react_dom_v18,
react: react_v18,
'@vue/composition-api': vue_composition_api,
vue: vue_v3,
}),
],
}
In your web App
// Vue v3
import { ref, reactive, watch } from 'vue'
// Vue v2
import { ref, reactive, watch } from '@vue/composition-api'
// React v18
import { useState, useEffect, useMemo } from 'react'
// ReactDOM v18
import { createRoot } from 'react-dom/client'
// Antd v4
import { Button, Table } from 'antd'
If you want to modify the builtin module
import { libMeta2external } from 'vite-plugin-fast-external/presets'
import vue_v2 from 'vite-plugin-fast-external/presets/vue-v2'
// interface Vue_v2 extends LibMeta {
// name: string
// members: string[]
// }
vue_v2.name = 'ExtendVue'
vue_v2.members = vue_v2.members.push('ExtendAPI')
export default {
plugins: [
external({
vue: libMeta2external(vue_v2),
}),
],
}
Support custom external code by function
external({
module: () => `
const M = window.Module;
const D = M.default || M;
export { D as default };
export const member1 = M.member1;
// other 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 3 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.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.