├── packages ├── vite-html-plugin │ ├── .gitignore │ ├── tsconfig.json │ ├── CHANGELOG.md │ ├── vite.config.ts │ ├── package.json │ ├── README.md │ └── src │ │ └── index.ts ├── vite-plugin-utils │ ├── index.ts │ ├── README.md │ ├── tsconfig.json │ ├── package.json │ ├── constant │ │ └── index.ts │ ├── sort-plugin │ │ ├── index.ts │ │ └── index.txt │ └── function │ │ └── index.ts ├── vite-plugin-fast-external │ ├── index.d.ts │ ├── presets │ │ ├── redux-v5.js │ │ ├── vuex-v3.js │ │ ├── vuex-v4.js │ │ ├── vue-v2.js │ │ ├── react-dom-v17.js │ │ ├── react-dom-v18.js │ │ ├── pinia-v2.js │ │ ├── react-router-v5.js │ │ ├── react-router-dom-v5.js │ │ ├── vue-router-v4.js │ │ ├── react-v17.js │ │ ├── react-router-v6.js │ │ ├── react-v18.js │ │ ├── react-router-dom-v6.js │ │ ├── index.d.ts │ │ ├── vue-composition-api.js │ │ ├── antd-v4.js │ │ ├── ant-design-vue-v1.js │ │ ├── element-ui.js │ │ ├── vue-v3.js │ │ ├── index.js │ │ ├── element-plus.js │ │ └── ant-design-vue-v3.js │ ├── package.json │ ├── index.js │ ├── README.zh-CN.md │ └── README.md ├── viters │ └── package.json ├── vite-utils │ └── package.json ├── create-viters │ └── package.json └── vite-plugin-angular │ └── package.json ├── pnpm-workspace.yaml ├── playground ├── vite-html-plugin │ ├── src │ │ ├── bar.js │ │ └── foo.js │ ├── public │ │ ├── foo.html │ │ └── bar.ejs.html │ ├── package.json │ └── vite.config.js └── vite-plugin-fast-external │ ├── public │ └── favicon.ico │ ├── package.json │ ├── index.html │ ├── main.js │ ├── react.html │ └── vite.config.js ├── package.json ├── LICENSE ├── README.md ├── .gitignore ├── README1.md ├── svg-gif.svg ├── README2.md ├── symbol.txt └── pnpm-lock.yaml /packages/vite-html-plugin/.gitignore: -------------------------------------------------------------------------------- 1 | /index.js 2 | /index.cjs 3 | /index.mjs -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - 'packages/*' 3 | - 'playground/**' 4 | -------------------------------------------------------------------------------- /playground/vite-html-plugin/src/bar.js: -------------------------------------------------------------------------------- 1 | 2 | window.app.innerHTML = `

bar.js

` 3 | -------------------------------------------------------------------------------- /playground/vite-html-plugin/src/foo.js: -------------------------------------------------------------------------------- 1 | 2 | window.app.innerHTML = `

foo.js

` 3 | -------------------------------------------------------------------------------- /packages/vite-plugin-utils/index.ts: -------------------------------------------------------------------------------- 1 | 2 | export * from './constant' 3 | export * from './function' 4 | export * from './sort-plugin' 5 | -------------------------------------------------------------------------------- /playground/vite-plugin-fast-external/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/caoxiemeihao/vite-plugins/HEAD/playground/vite-plugin-fast-external/public/favicon.ico -------------------------------------------------------------------------------- /playground/vite-html-plugin/public/foo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | foo.html 5 | 6 | 7 |
8 | 9 | 10 | -------------------------------------------------------------------------------- /packages/vite-plugin-utils/README.md: -------------------------------------------------------------------------------- 1 | # vite-plugin-utils 2 | 3 | A collection of opinionated Vite plugin utils 4 | 5 | ## API 6 | 7 | - `vite-plugin-utils/constant` 8 | - `vite-plugin-utils/function` 9 | - `vite-plugin-utils/sort-plugin` -------------------------------------------------------------------------------- /playground/vite-html-plugin/public/bar.ejs.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | bar.html 5 | 6 | 7 |
8 | Template data: 9 |
<%= JSON.stringify(user) %>
10 | 11 | 12 | -------------------------------------------------------------------------------- /packages/vite-plugin-fast-external/index.d.ts: -------------------------------------------------------------------------------- 1 | import { Plugin } from 'vite'; 2 | 3 | export default external; 4 | declare const external: VitePluginFastExternal; 5 | 6 | export interface VitePluginFastExternal { 7 | (entries: Record string | Promise)>): Plugin; 8 | } 9 | -------------------------------------------------------------------------------- /playground/vite-plugin-fast-external/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vite-plugin-fast-external-test", 3 | "version": "1.0.0", 4 | "main": "main.js", 5 | "license": "MIT", 6 | "scripts": { 7 | "build": "vite build" 8 | }, 9 | "devDependencies": { 10 | "vite": "^3.x.x" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/vite-plugin-fast-external/presets/redux-v5.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @type {import('.').LibMeta} 3 | */ 4 | module.exports = { 5 | name: 'Redux', 6 | members: [ 7 | '__DO_NOT_USE__ActionTypes', 8 | 'applyMiddleware', 9 | 'bindActionCreators', 10 | 'combineReducers', 11 | 'compose', 12 | 'createStore', 13 | ], 14 | }; 15 | -------------------------------------------------------------------------------- /packages/viters/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "viters", 3 | "version": "0.0.0", 4 | "description": "viters", 5 | "main": "dist/index.js", 6 | "repository": { 7 | "url": "https://github.com/caoxiemeihao/vite-plugins.git", 8 | "directory": "viters" 9 | }, 10 | "author": "草鞋没号 <308487730@qq.com>", 11 | "license": "MIT" 12 | } 13 | -------------------------------------------------------------------------------- /playground/vite-html-plugin/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vite-html-plugin-test", 3 | "version": "1.0.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "vite", 7 | "build": "vite build", 8 | "preview": "vite preview" 9 | }, 10 | "devDependencies": { 11 | "vite": "^3.x.x", 12 | "vite-html-plugin": "workspace:*" 13 | } 14 | } -------------------------------------------------------------------------------- /packages/vite-utils/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vite-utils", 3 | "version": "0.0.0", 4 | "description": "vite-utils", 5 | "main": "dist/index.js", 6 | "repository": { 7 | "url": "https://github.com/caoxiemeihao/vite-plugins.git", 8 | "directory": "vite-utils" 9 | }, 10 | "author": "草鞋没号 <308487730@qq.com>", 11 | "license": "MIT" 12 | } 13 | -------------------------------------------------------------------------------- /packages/create-viters/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "create-viters", 3 | "version": "0.0.0", 4 | "description": "create-viters", 5 | "main": "dist/index.js", 6 | "repository": { 7 | "url": "https://github.com/caoxiemeihao/vite-plugins.git", 8 | "directory": "create-viters" 9 | }, 10 | "author": "草鞋没号 <308487730@qq.com>", 11 | "license": "MIT" 12 | } 13 | -------------------------------------------------------------------------------- /packages/vite-html-plugin/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2019", 4 | "module": "CommonJS", 5 | "moduleResolution": "Node", 6 | "esModuleInterop": true, 7 | "skipLibCheck": true, 8 | "declaration": true, 9 | "baseUrl": ".", 10 | "outDir": "dist", 11 | "strict": true 12 | }, 13 | "include": ["src/**/*.ts"] 14 | } 15 | -------------------------------------------------------------------------------- /packages/vite-plugin-fast-external/presets/vuex-v3.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @type {import('.').LibMeta} 3 | */ 4 | module.exports = { 5 | name: 'Vuex', 6 | members: [ 7 | 'version', 8 | 'Store', 9 | 'install', 10 | 'mapState', 11 | 'mapMutations', 12 | 'mapGetters', 13 | 'mapActions', 14 | 'createNamespacedHelpers', 15 | 'createLogger', 16 | ], 17 | }; -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vite-plugins", 3 | "private": true, 4 | "author": "草鞋没号 <308487730@qq.com>", 5 | "license": "MIT", 6 | "scripts": { 7 | "dev": "pnpm --parallel --filter=./packages/* run dev", 8 | "build": "pnpm --filter=./packages/* run build" 9 | }, 10 | "devDependencies": { 11 | "@types/node": "^18.0.6", 12 | "typescript": "^4.7.4" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/vite-plugin-utils/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2018", 4 | "module": "CommonJS", 5 | "esModuleInterop": true, 6 | "moduleResolution": "Node", 7 | "allowJs": true, 8 | "baseUrl": ".", 9 | "outDir": "dist", 10 | "declaration": true, 11 | "allowSyntheticDefaultImports": true, 12 | "skipLibCheck": true 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/vite-plugin-angular/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vite-plugin-angular", 3 | "version": "0.0.0", 4 | "description": "vite-plugin-angular", 5 | "main": "dist/index.js", 6 | "repository": { 7 | "url": "https://github.com/caoxiemeihao/vite-plugins.git", 8 | "directory": "packages/vite-plugin-angular" 9 | }, 10 | "author": "草鞋没号 <308487730@qq.com>", 11 | "license": "MIT" 12 | } 13 | -------------------------------------------------------------------------------- /packages/vite-plugin-fast-external/presets/vuex-v4.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @type {import('.').LibMeta} 3 | */ 4 | module.exports = { 5 | name: 'Vuex', 6 | members: [ 7 | 'version', 8 | 'Store', 9 | 'storeKey', 10 | 'createStore', 11 | 'useStore', 12 | 'mapState', 13 | 'mapMutations', 14 | 'mapGetters', 15 | 'mapActions', 16 | 'createNamespacedHelpers', 17 | 'createLogger' 18 | ], 19 | }; -------------------------------------------------------------------------------- /packages/vite-plugin-fast-external/presets/vue-v2.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @type {import('.').LibMeta} 3 | */ 4 | module.exports = { 5 | name: 'Vue', 6 | members: [ 7 | 'util', 8 | 'set', 9 | 'delete', 10 | 'nextTick', 11 | 'observable', 12 | 'options', 13 | 'use', 14 | 'mixin', 15 | 'cid', 16 | 'extend', 17 | 'component', 18 | 'directive', 19 | 'filter', 20 | 'version', 21 | 'compile', 22 | ], 23 | }; -------------------------------------------------------------------------------- /packages/vite-plugin-fast-external/presets/react-dom-v17.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @type {import('.').LibMeta} 3 | */ 4 | module.exports = { 5 | name: 'ReactDOM', 6 | members: [ 7 | '__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED', 8 | 'createPortal', 9 | 'findDOMNode', 10 | 'flushSync', 11 | 'hydrate', 12 | 'render', 13 | 'unmountComponentAtNode', 14 | 'unstable_batchedUpdates', 15 | 'unstable_createPortal', 16 | 'unstable_renderSubtreeIntoContainer', 17 | 'version', 18 | ], 19 | }; -------------------------------------------------------------------------------- /packages/vite-plugin-fast-external/presets/react-dom-v18.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @type {import('.').LibMeta} 3 | */ 4 | module.exports = { 5 | name: 'ReactDOM', 6 | members: [ 7 | '__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED', 8 | 'createPortal', 9 | 'createRoot', 10 | 'findDOMNode', 11 | 'flushSync', 12 | 'hydrate', 13 | 'hydrateRoot', 14 | 'render', 15 | 'unmountComponentAtNode', 16 | 'unstable_batchedUpdates', 17 | 'unstable_renderSubtreeIntoContainer', 18 | 'version', 19 | ], 20 | }; -------------------------------------------------------------------------------- /packages/vite-plugin-fast-external/presets/pinia-v2.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @type {import('.').LibMeta} 3 | */ 4 | module.exports = { 5 | name: 'Pinia', 6 | members: [ 7 | 'MutationType', 8 | 'PiniaVuePlugin', 9 | 'acceptHMRUpdate', 10 | 'createPinia', 11 | 'defineStore', 12 | 'getActivePinia', 13 | 'mapActions', 14 | 'mapGetters', 15 | 'mapState', 16 | 'mapStores', 17 | 'mapWritableState', 18 | 'setActivePinia', 19 | 'setMapStoreSuffix', 20 | 'skipHydrate', 21 | 'storeToRefs', 22 | ], 23 | }; -------------------------------------------------------------------------------- /packages/vite-plugin-fast-external/presets/react-router-v5.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @type {import('.').LibMeta} 3 | */ 4 | module.exports = { 5 | name: 'ReactRouter', 6 | members: [ 7 | 'MemoryRouter', 8 | 'Prompt', 9 | 'Redirect', 10 | 'Route', 11 | 'Router', 12 | 'StaticRouter', 13 | 'Switch', 14 | '__HistoryContext', 15 | '__RouterContext', 16 | 'generatePath', 17 | 'matchPath', 18 | 'useHistory', 19 | 'useLocation', 20 | 'useParams', 21 | 'useRouteMatch', 22 | 'withRouter', 23 | ], 24 | }; 25 | -------------------------------------------------------------------------------- /packages/vite-plugin-fast-external/presets/react-router-dom-v5.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @type {import('.').LibMeta} 3 | */ 4 | module.exports = { 5 | name: 'ReactRouterDOM', 6 | members: [ 7 | 'BrowserRouter', 8 | 'HashRouter', 9 | 'Link', 10 | 'MemoryRouter', 11 | 'NavLink', 12 | 'Prompt', 13 | 'Redirect', 14 | 'Route', 15 | 'Router', 16 | 'StaticRouter', 17 | 'Switch', 18 | 'generatePath', 19 | 'matchPath', 20 | 'useHistory', 21 | 'useLocation', 22 | 'useParams', 23 | 'useRouteMatch', 24 | 'withRouter', 25 | ], 26 | }; 27 | -------------------------------------------------------------------------------- /playground/vite-plugin-fast-external/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /packages/vite-html-plugin/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | 2 | ## [2022-07-25] v0.1.3 3 | 4 | - bce2fca html-plugin(test): v0.1.3 5 | - 9cd22e6 html-plugin(docs): v0.1.3 6 | 7 | ## [2022-07-25] v0.1.2 8 | 9 | - f302040 html-plugin: test v0.1.2 10 | - c11eab5 html-plugin(refactor): better logic 🌱 11 | 12 | ## [2022-07-25] v0.1.1 13 | 14 | - 228f2d1 html-plugin: docs v0.1.1 15 | - 49b89f2 html-plugin: use POSIX 16 | 17 | ## [2022-07-25] v0.1.0 18 | 19 | - c2e4f94 html-plugin: v0.1.0 20 | - 6fcb38a html-plugin: add README.md 21 | - 078fe2c html-plugin: update comments 22 | - 1d5f53e html-plugin: add src/index.ts, src/utils/ts 23 | - 44d9be5 html-plugin: add tsconfig.json 24 | -------------------------------------------------------------------------------- /playground/vite-plugin-fast-external/main.js: -------------------------------------------------------------------------------- 1 | import angular from '@angular/core' 2 | import { createApp } from 'vue' 3 | import { createPinia } from 'pinia' 4 | import { createWebHashHistory } from 'vue-router' 5 | 6 | app.innerHTML += ` 7 |
 8 | import angular from '@angular/core'
 9 | 
10 | ${JSON.stringify(angular)}
11 | 
12 | // ----------------------------------------
13 | import { createApp } from 'vue'
14 | 
15 |   ${createApp}
16 | 
17 | // ----------------------------------------
18 | 
19 | import { createApp } from 'pinia'
20 | 
21 |   ${createPinia}
22 | 
23 | // ----------------------------------------
24 | 
25 | import { createWebHashHistory } from 'vue-router'
26 | 
27 |   ${createWebHashHistory}
28 | 
29 | 
30 | ` 31 | -------------------------------------------------------------------------------- /packages/vite-plugin-fast-external/presets/vue-router-v4.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @type {import('.').LibMeta} 3 | */ 4 | module.exports = { 5 | name: 'VueRouter', 6 | members: [ 7 | 'NavigationFailureType', 8 | 'RouterLink', 9 | 'RouterView', 10 | 'START_LOCATION', 11 | 'createMemoryHistory', 12 | 'createRouter', 13 | 'createRouterMatcher', 14 | 'createWebHashHistory', 15 | 'createWebHistory', 16 | 'isNavigationFailure', 17 | 'matchedRouteKey', 18 | 'onBeforeRouteLeave', 19 | 'onBeforeRouteUpdate', 20 | 'parseQuery', 21 | 'routeLocationKey', 22 | 'routerKey', 23 | 'routerViewLocationKey', 24 | 'stringifyQuery', 25 | 'useLink', 26 | 'useRoute', 27 | 'useRouter', 28 | 'viewDepthKey', 29 | ], 30 | }; -------------------------------------------------------------------------------- /playground/vite-html-plugin/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import html from 'vite-html-plugin' 3 | 4 | export default defineConfig({ 5 | plugins: [ 6 | html([ 7 | { 8 | // Equivalent to 9 | // { 'foo.html': 'public/foo.html' } 10 | template: 'public/foo.html', 11 | inject: '/src/foo.js', 12 | }, 13 | { 14 | template: { 15 | // Alias 16 | 'bar.html': 'public/bar.ejs.html', 17 | }, 18 | inject: '/src/bar.js', 19 | transformIndexHtml: () => ({ 20 | templateData: { 21 | // `ejs` template data 22 | user: { 23 | name: 'Kevin', 24 | age: '25', 25 | }, 26 | }, 27 | }), 28 | }, 29 | ]), 30 | ], 31 | }) 32 | -------------------------------------------------------------------------------- /packages/vite-plugin-fast-external/presets/react-v17.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @type {import('.').LibMeta} 3 | */ 4 | module.exports = { 5 | name: 'React', 6 | members: [ 7 | 'Fragment', 8 | 'StrictMode', 9 | 'Profiler', 10 | 'Suspense', 11 | 'Children', 12 | 'Component', 13 | 'PureComponent', 14 | '__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED', 15 | 'cloneElement', 16 | 'createContext', 17 | 'createElement', 18 | 'createFactory', 19 | 'createRef', 20 | 'forwardRef', 21 | 'isValidElement', 22 | 'lazy', 23 | 'memo', 24 | 'useCallback', 25 | 'useContext', 26 | 'useDebugValue', 27 | 'useEffect', 28 | 'useImperativeHandle', 29 | 'useLayoutEffect', 30 | 'useMemo', 31 | 'useReducer', 32 | 'useRef', 33 | 'useState', 34 | 'version', 35 | ], 36 | }; -------------------------------------------------------------------------------- /packages/vite-html-plugin/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import { builtinModules } from 'module' 3 | import pkg from './package.json' 4 | 5 | export default defineConfig({ 6 | build: { 7 | minify: false, 8 | emptyOutDir: false, 9 | outDir: '', 10 | target: 'node14', 11 | lib: { 12 | entry: 'src/index.ts', 13 | formats: ['cjs', 'es'], 14 | fileName: format => format === 'cjs' ? '[name].cjs' : '[name].js', 15 | }, 16 | rollupOptions: { 17 | external: [ 18 | 'electron', 19 | 'esbuild', 20 | 'vite', 21 | ...builtinModules, 22 | ...builtinModules.map(m => `node:${m}`), 23 | // @ts-ignore 24 | ...Object.keys(pkg.dependencies || {}), 25 | ], 26 | output: { 27 | exports: 'named', 28 | }, 29 | }, 30 | }, 31 | }) 32 | -------------------------------------------------------------------------------- /packages/vite-plugin-fast-external/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vite-plugin-fast-external", 3 | "version": "2.5.1", 4 | "description": "Out of the box, built in Vue, React, Antd, Element and others", 5 | "main": "index.js", 6 | "repository": { 7 | "type": "git", 8 | "url": "git+https://github.com/caoxiemeihao/vite-plugins.git", 9 | "directory": "packages/vite-plugin-fast-external" 10 | }, 11 | "readme": "https://github.com/caoxiemeihao/vite-plugins/tree/main/packages/vite-plugin-fast-external#readme", 12 | "author": "草鞋没号 <308487730@qq.com>", 13 | "license": "MIT", 14 | "scripts": {}, 15 | "devDependencies": { 16 | "vite": "^3.x.x" 17 | }, 18 | "keywords": [ 19 | "vite", 20 | "plugin", 21 | "external", 22 | "vue", 23 | "react", 24 | "antd", 25 | "element", 26 | "composition-api" 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /packages/vite-plugin-utils/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vite-plugin-utils", 3 | "description": "A collection of opinionated Vite plugin utils", 4 | "version": "0.2.1", 5 | "main": "dist/index.js", 6 | "repository": { 7 | "type": "git", 8 | "url": "git+https://github.com/caoxiemeihao/vite-plugins.git", 9 | "directory": "packages/utils" 10 | }, 11 | "author": "草鞋没号 <308487730@qq.com>", 12 | "license": "MIT", 13 | "scripts": { 14 | "dev": "rm -rf dist && tsc --watch", 15 | "build": "rm -rf dist && tsc", 16 | "prepublishOnly": "npm run build" 17 | }, 18 | "dependencies": { 19 | "acorn-walk": "^8.2.0", 20 | "fast-glob": "^3.2.11" 21 | }, 22 | "devDependencies": { 23 | "vite": "^3.x.x" 24 | }, 25 | "keywords": [ 26 | "vite", 27 | "plugin", 28 | "utils" 29 | ], 30 | "files": [ 31 | "dist" 32 | ] 33 | } 34 | -------------------------------------------------------------------------------- /packages/vite-plugin-fast-external/presets/react-router-v6.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @type {import('.').LibMeta} 3 | */ 4 | module.exports = { 5 | name: 'ReactRouter', 6 | members: [ 7 | 'NavigationType', 8 | 'createPath', 9 | 'parsePath', 10 | 'MemoryRouter', 11 | 'Navigate', 12 | 'Outlet', 13 | 'Route', 14 | 'Router', 15 | 'Routes', 16 | 'UNSAFE_LocationContext', 17 | 'UNSAFE_NavigationContext', 18 | 'UNSAFE_RouteContext', 19 | 'createRoutesFromChildren', 20 | 'generatePath', 21 | 'matchPath', 22 | 'matchRoutes', 23 | 'renderMatches', 24 | 'resolvePath', 25 | 'useHref', 26 | 'useInRouterContext', 27 | 'useLocation', 28 | 'useMatch', 29 | 'useNavigate', 30 | 'useNavigationType', 31 | 'useOutlet', 32 | 'useOutletContext', 33 | 'useParams', 34 | 'useResolvedPath', 35 | 'useRoutes', 36 | ], 37 | }; 38 | -------------------------------------------------------------------------------- /packages/vite-plugin-fast-external/presets/react-v18.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @type {import('.').LibMeta} 3 | */ 4 | module.exports = { 5 | name: 'React', 6 | members: [ 7 | 'Children', 8 | 'Component', 9 | 'Fragment', 10 | 'Profiler', 11 | 'PureComponent', 12 | 'StrictMode', 13 | 'Suspense', 14 | '__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED', 15 | 'cloneElement', 16 | 'createContext', 17 | 'createElement', 18 | 'createFactory', 19 | 'createRef', 20 | 'forwardRef', 21 | 'isValidElement', 22 | 'lazy', 23 | 'memo', 24 | 'startTransition', 25 | 'unstable_act', 26 | 'useCallback', 27 | 'useContext', 28 | 'useDebugValue', 29 | 'useDeferredValue', 30 | 'useEffect', 31 | 'useId', 32 | 'useImperativeHandle', 33 | 'useInsertionEffect', 34 | 'useLayoutEffect', 35 | 'useMemo', 36 | 'useReducer', 37 | 'useRef', 38 | 'useState', 39 | 'useSyncExternalStore', 40 | 'useTransition', 41 | 'version', 42 | ], 43 | }; -------------------------------------------------------------------------------- /playground/vite-plugin-fast-external/react.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | React App 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /packages/vite-plugin-fast-external/presets/react-router-dom-v6.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @type {import('.').LibMeta} 3 | */ 4 | module.exports = { 5 | name: 'ReactRouterDOM', 6 | members: [ 7 | 'MemoryRouter', 8 | 'Navigate', 9 | 'NavigationType', 10 | 'Outlet', 11 | 'Route', 12 | 'Router', 13 | 'Routes', 14 | 'UNSAFE_LocationContext', 15 | 'UNSAFE_NavigationContext', 16 | 'UNSAFE_RouteContext', 17 | 'createPath', 18 | 'createRoutesFromChildren', 19 | 'generatePath', 20 | 'matchPath', 21 | 'matchRoutes', 22 | 'parsePath', 23 | 'renderMatches', 24 | 'resolvePath', 25 | 'useHref', 26 | 'useInRouterContext', 27 | 'useLocation', 28 | 'useMatch', 29 | 'useNavigate', 30 | 'useNavigationType', 31 | 'useOutlet', 32 | 'useOutletContext', 33 | 'useParams', 34 | 'useResolvedPath', 35 | 'useRoutes', 36 | 'BrowserRouter', 37 | 'HashRouter', 38 | 'Link', 39 | 'NavLink', 40 | 'createSearchParams', 41 | 'unstable_HistoryRouter', 42 | 'useLinkClickHandler', 43 | 'useSearchParams', 44 | ], 45 | }; 46 | -------------------------------------------------------------------------------- /packages/vite-plugin-utils/constant/index.ts: -------------------------------------------------------------------------------- 1 | 2 | // https://github.com/vitejs/vite/blob/c3f6731bafeadd310efa4325cb8dcc639636fe48/packages/vite/src/node/constants.ts#L25-L33 3 | export const DEFAULT_EXTENSIONS = [ 4 | '.mjs', 5 | '.js', 6 | '.mts', 7 | '.ts', 8 | '.jsx', 9 | '.tsx', 10 | '.json' 11 | ] 12 | export const KNOWN_SFC_EXTENSIONS = [ 13 | '.vue', 14 | '.svelte', 15 | ] 16 | 17 | // https://github.com/vitejs/vite/blob/c3f6731bafeadd310efa4325cb8dcc639636fe48/packages/vite/src/node/constants.ts#L91-L123 18 | export const KNOWN_ASSET_TYPES = [ 19 | // images 20 | 'png', 21 | 'jpe?g', 22 | 'jfif', 23 | 'pjpeg', 24 | 'pjp', 25 | 'gif', 26 | 'svg', 27 | 'ico', 28 | 'webp', 29 | 'avif', 30 | 31 | // media 32 | 'mp4', 33 | 'webm', 34 | 'ogg', 35 | 'mp3', 36 | 'wav', 37 | 'flac', 38 | 'aac', 39 | 40 | // fonts 41 | 'woff2?', 42 | 'eot', 43 | 'ttf', 44 | 'otf', 45 | 46 | // other 47 | 'webmanifest', 48 | 'pdf', 49 | 'txt' 50 | ] 51 | 52 | export const multilineCommentsRE = /\/\*(.|[\r\n])*?\*\//gm 53 | export const singlelineCommentsRE = /\/\/.*/g 54 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 草鞋没号 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /packages/vite-html-plugin/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vite-html-plugin", 3 | "version": "0.1.4", 4 | "description": "Html template for Vite", 5 | "type": "module", 6 | "main": "dist/index.js", 7 | "types": "src", 8 | "exports": { 9 | ".": { 10 | "import": "./index.js", 11 | "require": "./index.cjs" 12 | } 13 | }, 14 | "repository": { 15 | "type": "git", 16 | "url": "git+https://github.com/caoxiemeihao/vite-plugins.git", 17 | "directory": "packages/vite-html-plugin" 18 | }, 19 | "readme": "https://github.com/caoxiemeihao/vite-plugins/tree/main/packages/vite-html-plugin#readme", 20 | "author": "草鞋没号 <308487730@qq.com>", 21 | "license": "MIT", 22 | "scripts": { 23 | "dev": "vite build --watch", 24 | "build": "vite build", 25 | "prepublishOnly": "npm run build" 26 | }, 27 | "devDependencies": { 28 | "lodash.template": "^4.5.0", 29 | "vite": "^3.x.x", 30 | "vite-plugin-utils": "^0.3.5" 31 | }, 32 | "keywords": [ 33 | "vite", 34 | "plugin", 35 | "html", 36 | "ejs", 37 | "template", 38 | "webpack" 39 | ], 40 | "files": [ 41 | "src", 42 | "index.js", 43 | "index.cjs" 44 | ] 45 | } 46 | -------------------------------------------------------------------------------- /packages/vite-plugin-fast-external/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @type {import('.').VitePluginFastExternal} 3 | */ 4 | module.exports = function external(entries) { 5 | const externalId = '__fast-external:'; 6 | const keys = Object.keys(entries); 7 | 8 | return { 9 | name: 'vite-plugin-fast-external', 10 | enforce: 'pre', 11 | resolveId(source) { 12 | if (keys.includes(source)) { 13 | // avoid vite builtin `vite:resolve` plugin 14 | return externalId + source; 15 | } 16 | }, 17 | config(config) { 18 | if (!config.optimizeDeps) config.optimizeDeps = {}; 19 | if (!config.optimizeDeps.exclude) config.optimizeDeps.exclude = []; 20 | 21 | let exclude = keys; 22 | if (config.optimizeDeps.include) { 23 | exclude = keys.filter(key => !config.optimizeDeps.include.includes(key)); 24 | } 25 | config.optimizeDeps.exclude.push(...exclude); 26 | }, 27 | load(id) { 28 | if (id.startsWith(externalId)) { 29 | const module = id.split(externalId)[1]; 30 | const fnOrIife = entries[module]; 31 | 32 | return typeof fnOrIife === 'function' 33 | ? fnOrIife(id) 34 | : `const M = window['${fnOrIife}']; export { M as default }`; 35 | } 36 | }, 37 | }; 38 | }; 39 | -------------------------------------------------------------------------------- /packages/vite-plugin-fast-external/presets/index.d.ts: -------------------------------------------------------------------------------- 1 | 2 | export interface LibMeta { 3 | name: string 4 | members: string[] 5 | } 6 | 7 | export declare function lib2external(name: string, members: string[]): () => string 8 | 9 | export declare const antd_vue_v1: () => string 10 | export declare const antd_vue_v3: () => string 11 | export declare const antd_v4: () => string 12 | export declare const element_plus: () => string 13 | export declare const element_ui: () => string 14 | export declare const pinia_v2: () => string 15 | export declare const react_dom_v17: () => string 16 | export declare const react_dom_v18: () => string 17 | export declare const react_router_dom_v5: () => string 18 | export declare const react_router_dom_v6: () => string 19 | export declare const react_router_v5: () => string 20 | export declare const react_router_v6: () => string 21 | export declare const react_v17: () => string 22 | export declare const react_v18: () => string 23 | export declare const redux_v5: () => string 24 | export declare const vue_composition_api: () => string 25 | export declare const vue_router_v4: () => string 26 | export declare const vue_v2: () => string 27 | export declare const vue_v3: () => string 28 | export declare const vuex_v3: () => string 29 | export declare const vuex_v4: () => string 30 | 31 | -------------------------------------------------------------------------------- /packages/vite-plugin-fast-external/presets/vue-composition-api.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @type {import('.').LibMeta} 3 | */ 4 | module.exports = { 5 | name: 'VueCompositionAPI', 6 | members: [ 7 | 'EffectScope', 8 | 'computed', 9 | 'createApp', 10 | 'createRef', 11 | 'customRef', 12 | 'default', 13 | 'defineAsyncComponent', 14 | 'defineComponent', 15 | 'del', 16 | 'effectScope', 17 | 'getCurrentInstance', 18 | 'getCurrentScope', 19 | 'h', 20 | 'inject', 21 | 'isRaw', 22 | 'isReactive', 23 | 'isReadonly', 24 | 'isRef', 25 | 'markRaw', 26 | 'nextTick', 27 | 'onActivated', 28 | 'onBeforeMount', 29 | 'onBeforeUnmount', 30 | 'onBeforeUpdate', 31 | 'onDeactivated', 32 | 'onErrorCaptured', 33 | 'onMounted', 34 | 'onScopeDispose', 35 | 'onServerPrefetch', 36 | 'onUnmounted', 37 | 'onUpdated', 38 | 'provide', 39 | 'proxyRefs', 40 | 'reactive', 41 | 'readonly', 42 | 'ref', 43 | 'set', 44 | 'shallowReactive', 45 | 'shallowReadonly', 46 | 'shallowRef', 47 | 'toRaw', 48 | 'toRef', 49 | 'toRefs', 50 | 'triggerRef', 51 | 'unref', 52 | 'useAttrs', 53 | 'useCSSModule', 54 | 'useCssModule', 55 | 'useSlots', 56 | 'version', 57 | 'warn', 58 | 'watch', 59 | 'watchEffect', 60 | 'watchPostEffect', 61 | 'watchSyncEffect', 62 | ], 63 | }; -------------------------------------------------------------------------------- /packages/vite-plugin-fast-external/presets/antd-v4.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @type {import('.').LibMeta} 3 | */ 4 | module.exports = { 5 | name: 'antd', 6 | members: [ 7 | 'Affix', 8 | 'Anchor', 9 | 'AutoComplete', 10 | 'Alert', 11 | 'Avatar', 12 | 'BackTop', 13 | 'Badge', 14 | 'Breadcrumb', 15 | 'Button', 16 | 'Calendar', 17 | 'Card', 18 | 'Collapse', 19 | 'Carousel', 20 | 'Cascader', 21 | 'Checkbox', 22 | 'Col', 23 | 'Comment', 24 | 'ConfigProvider', 25 | 'DatePicker', 26 | 'Descriptions', 27 | 'Divider', 28 | 'Dropdown', 29 | 'Drawer', 30 | 'Empty', 31 | 'Form', 32 | 'Grid', 33 | 'Input', 34 | 'Image', 35 | 'InputNumber', 36 | 'Layout', 37 | 'List', 38 | 'message', 39 | 'Menu', 40 | 'Mentions', 41 | 'Modal', 42 | 'Statistic', 43 | 'notification', 44 | 'PageHeader', 45 | 'Pagination', 46 | 'Popconfirm', 47 | 'Popover', 48 | 'Progress', 49 | 'Radio', 50 | 'Rate', 51 | 'Result', 52 | 'Row', 53 | 'Select', 54 | 'Skeleton', 55 | 'Slider', 56 | 'Space', 57 | 'Spin', 58 | 'Steps', 59 | 'Switch', 60 | 'Table', 61 | 'Transfer', 62 | 'Tree', 63 | 'TreeSelect', 64 | 'Tabs', 65 | 'Tag', 66 | 'TimePicker', 67 | 'Timeline', 68 | 'Tooltip', 69 | 'Typography', 70 | 'Upload', 71 | 'version', 72 | ], 73 | }; -------------------------------------------------------------------------------- /playground/vite-plugin-fast-external/vite.config.js: -------------------------------------------------------------------------------- 1 | import path from 'path' 2 | import { defineConfig } from 'vite'; 3 | import external from '../../packages/fast-external'; 4 | import { vue_v3, pinia_v2, lib2external } from '../../packages/fast-external/presets'; 5 | 6 | export default defineConfig({ 7 | plugins: [ 8 | external({ 9 | '@angular/core': () => `const Angular = { version: '13.3.0' }; export default Angular;`, 10 | vue: vue_v3, 11 | pinia: pinia_v2, 12 | 'vue-router': lib2external('VueRouter', [ 13 | 'NavigationFailureType', 14 | 'RouterLink', 15 | 'RouterView', 16 | 'START_LOCATION', 17 | 'createMemoryHistory', 18 | 'createRouter', 19 | 'createRouterMatcher', 20 | 'createWebHashHistory', 21 | 'createWebHistory', 22 | 'isNavigationFailure', 23 | 'matchedRouteKey', 24 | 'onBeforeRouteLeave', 25 | 'onBeforeRouteUpdate', 26 | 'parseQuery', 27 | 'routeLocationKey', 28 | 'routerKey', 29 | 'routerViewLocationKey', 30 | 'stringifyQuery', 31 | 'useLink', 32 | 'useRoute', 33 | 'useRouter', 34 | 'viewDepthKey', 35 | ]), 36 | }), 37 | ], 38 | build: { 39 | rollupOptions: { 40 | input: { 41 | index: path.join(__dirname, 'index.html'), 42 | react: path.join(__dirname, 'react.html'), 43 | } 44 | } 45 | } 46 | }); 47 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![黑发不知勤学早,白首方悔读书迟](https://github.com/caoxiemeihao/vite-plugins/blob/main/svg-gif.svg?raw=true) 2 | 3 | --- 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 22 | 23 | 24 | 27 | 28 | 33 | 34 | 35 | 38 | 39 | 44 | 45 | 46 |
NameDescriptionNpm
14 | vite-plugin-fast-external 15 | Without lexical transform, support custom external code 18 | 19 | 20 | 21 |
25 | vite-html-plugin 26 | Enhance html template 29 | 30 | 31 | 32 |
36 | vite-plugin-utils 37 | A collection of opinionated Vite plugin utils 40 | 41 | 42 | 43 |
47 | -------------------------------------------------------------------------------- /packages/vite-plugin-fast-external/presets/ant-design-vue-v1.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @type {import('.').LibMeta} 3 | */ 4 | module.exports = { 5 | name: 'antd', 6 | members: [ 7 | 'install', 8 | 'Affix', 9 | 'Anchor', 10 | 'AutoComplete', 11 | 'Alert', 12 | 'Avatar', 13 | 'BackTop', 14 | 'Badge', 15 | 'Base', 16 | 'Breadcrumb', 17 | 'Button', 18 | 'Calendar', 19 | 'Card', 20 | 'Collapse', 21 | 'Carousel', 22 | 'Cascader', 23 | 'Checkbox', 24 | 'Col', 25 | 'DatePicker', 26 | 'Divider', 27 | 'Dropdown', 28 | 'Form', 29 | 'FormModel', 30 | 'Icon', 31 | 'Input', 32 | 'InputNumber', 33 | 'Layout', 34 | 'List', 35 | 'LocaleProvider', 36 | 'message', 37 | 'Menu', 38 | 'Mentions', 39 | 'Modal', 40 | 'notification', 41 | 'Pagination', 42 | 'Popconfirm', 43 | 'Popover', 44 | 'Progress', 45 | 'Radio', 46 | 'Rate', 47 | 'Row', 48 | 'Select', 49 | 'Slider', 50 | 'Spin', 51 | 'Statistic', 52 | 'Steps', 53 | 'Switch', 54 | 'Table', 55 | 'Transfer', 56 | 'Tree', 57 | 'TreeSelect', 58 | 'Tabs', 59 | 'Tag', 60 | 'TimePicker', 61 | 'Timeline', 62 | 'Tooltip', 63 | 'Upload', 64 | 'version', 65 | 'Drawer', 66 | 'Skeleton', 67 | 'Comment', 68 | 'ConfigProvider', 69 | 'Empty', 70 | 'Result', 71 | 'Descriptions', 72 | 'PageHeader', 73 | 'Space', 74 | 'default', 75 | ], 76 | }; -------------------------------------------------------------------------------- /packages/vite-plugin-fast-external/presets/element-ui.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @type {import('.').LibMeta} 3 | */ 4 | module.exports = { 5 | name: 'ELEMENT', 6 | members: [ 7 | 'version', 8 | 'locale', 9 | 'i18n', 10 | 'install', 11 | 'CollapseTransition', 12 | 'Loading', 13 | 'Pagination', 14 | 'Dialog', 15 | 'Autocomplete', 16 | 'Dropdown', 17 | 'DropdownMenu', 18 | 'DropdownItem', 19 | 'Menu', 20 | 'Submenu', 21 | 'MenuItem', 22 | 'MenuItemGroup', 23 | 'Input', 24 | 'InputNumber', 25 | 'Radio', 26 | 'RadioGroup', 27 | 'RadioButton', 28 | 'Checkbox', 29 | 'CheckboxButton', 30 | 'CheckboxGroup', 31 | 'Switch', 32 | 'Select', 33 | 'Option', 34 | 'OptionGroup', 35 | 'Button', 36 | 'ButtonGroup', 37 | 'Table', 38 | 'TableColumn', 39 | 'DatePicker', 40 | 'TimeSelect', 41 | 'TimePicker', 42 | 'Popover', 43 | 'Tooltip', 44 | 'MessageBox', 45 | 'Breadcrumb', 46 | 'BreadcrumbItem', 47 | 'Form', 48 | 'FormItem', 49 | 'Tabs', 50 | 'TabPane', 51 | 'Tag', 52 | 'Tree', 53 | 'Alert', 54 | 'Notification', 55 | 'Slider', 56 | 'Icon', 57 | 'Row', 58 | 'Col', 59 | 'Upload', 60 | 'Progress', 61 | 'Spinner', 62 | 'Message', 63 | 'Badge', 64 | 'Card', 65 | 'Rate', 66 | 'Steps', 67 | 'Step', 68 | 'Carousel', 69 | 'Scrollbar', 70 | 'CarouselItem', 71 | 'Collapse', 72 | 'CollapseItem', 73 | 'Cascader', 74 | 'ColorPicker', 75 | 'Transfer', 76 | 'Container', 77 | 'Header', 78 | 'Aside', 79 | 'Main', 80 | 'Footer', 81 | 'Timeline', 82 | 'TimelineItem', 83 | 'Link', 84 | 'Divider', 85 | 'Image', 86 | 'Calendar', 87 | 'Backtop', 88 | 'InfiniteScroll', 89 | 'PageHeader', 90 | 'CascaderPanel', 91 | 'Avatar', 92 | 'Drawer', 93 | 'Popconfirm', 94 | 'Skeleton', 95 | 'SkeletonItem', 96 | 'Empty', 97 | 'Descriptions', 98 | 'DescriptionsItem', 99 | 'Result', 100 | ], 101 | }; -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | 9 | # Diagnostic reports (https://nodejs.org/api/report.html) 10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 11 | 12 | # Runtime data 13 | pids 14 | *.pid 15 | *.seed 16 | *.pid.lock 17 | 18 | # Directory for instrumented libs generated by jscoverage/JSCover 19 | lib-cov 20 | 21 | # Coverage directory used by tools like istanbul 22 | coverage 23 | *.lcov 24 | 25 | # nyc test coverage 26 | .nyc_output 27 | 28 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 29 | .grunt 30 | 31 | # Bower dependency directory (https://bower.io/) 32 | bower_components 33 | 34 | # node-waf configuration 35 | .lock-wscript 36 | 37 | # Compiled binary addons (https://nodejs.org/api/addons.html) 38 | build/Release 39 | 40 | # Dependency directories 41 | node_modules/ 42 | jspm_packages/ 43 | 44 | # TypeScript v1 declaration files 45 | typings/ 46 | 47 | # TypeScript cache 48 | *.tsbuildinfo 49 | 50 | # Optional npm cache directory 51 | .npm 52 | 53 | # Optional eslint cache 54 | .eslintcache 55 | 56 | # Microbundle cache 57 | .rpt2_cache/ 58 | .rts2_cache_cjs/ 59 | .rts2_cache_es/ 60 | .rts2_cache_umd/ 61 | 62 | # Optional REPL history 63 | .node_repl_history 64 | 65 | # Output of 'npm pack' 66 | *.tgz 67 | 68 | # Yarn Integrity file 69 | .yarn-integrity 70 | 71 | # dotenv environment variables file 72 | .env 73 | .env.test 74 | 75 | # parcel-bundler cache (https://parceljs.org/) 76 | .cache 77 | 78 | # Next.js build output 79 | .next 80 | 81 | # Nuxt.js build / generate output 82 | .nuxt 83 | dist 84 | 85 | # Gatsby files 86 | .cache/ 87 | # Comment in the public line in if your project uses Gatsby and *not* Next.js 88 | # https://nextjs.org/blog/next-9-1#public-directory-support 89 | # public 90 | 91 | # vuepress build output 92 | .vuepress/dist 93 | 94 | # Serverless directories 95 | .serverless/ 96 | 97 | # FuseBox cache 98 | .fusebox/ 99 | 100 | # DynamoDB Local files 101 | .dynamodb/ 102 | 103 | # TernJS port file 104 | .tern-port 105 | 106 | .DS_Store 107 | 108 | package-lock.json 109 | yarn.lock 110 | -------------------------------------------------------------------------------- /packages/vite-plugin-utils/sort-plugin/index.ts: -------------------------------------------------------------------------------- 1 | import type { Plugin } from 'vite' 2 | 3 | export const OfficialPlugins = { 4 | '@vitejs/plugin-vue': 'vite:vue', 5 | 'vite-plugin-vue2': 'vite-plugin-vue2', 6 | '@vitejs/plugin-vue-jsx': 'vite:vue-jsx', 7 | '@sveltejs/vite-plugin-svelte': 'vite-plugin-svelte', 8 | '@vitejs/plugin-react': [ 9 | 'vite:react-babel', 10 | 'vite:react-refresh', 11 | 'vite:react-jsx', 12 | ], 13 | } 14 | 15 | export interface SortOptions { 16 | plugin: Plugin 17 | names: string[] 18 | enforce: Plugin['enforce'] 19 | } 20 | 21 | /** 22 | * Some plugins must run after others 23 | */ 24 | export function sort(options: SortOptions): Plugin { 25 | const { plugin, names, enforce } = options 26 | const name = `${plugin.name}:sorter` 27 | 28 | return { 29 | ...plugin, 30 | name, 31 | 32 | // enforce: plugin.enforce, 33 | // // This may only run in the `vite build` 34 | // async options(options) { 35 | // return await plugin.options?.call(this, options) 36 | // }, 37 | // async config(config) { 38 | // return await plugin.config?.call(this, config) 39 | // }, 40 | 41 | async configResolved(config) { 42 | await plugin.configResolved?.call(this, config) 43 | 44 | const resolvedNames = config.plugins.map(p => p.name) 45 | let isFound = false 46 | 47 | if (enforce === 'pre') { 48 | const index = resolvedNames.findIndex(rn => names.includes(rn)) 49 | if (index > -1) { 50 | isFound = true 51 | // Move it to before known plugin 52 | // @ts-ignore 53 | config.plugins.splice(index, 0, plugin) 54 | } 55 | } else { 56 | // Find the last known plugin 57 | const lastIndex = [...resolvedNames].reverse().findIndex(rn => names.includes(rn)) 58 | if (lastIndex > -1) { 59 | isFound = true 60 | const index = resolvedNames.length - 1 - lastIndex 61 | // Move it to after known plugin 62 | // @ts-ignore 63 | config.plugins.splice(index + 1, 0, plugin) 64 | } 65 | } 66 | 67 | // Filter out the plugin itself 68 | const selfIndex = config.plugins.findIndex(p => p.name === name) 69 | if (isFound) { 70 | // @ts-ignore 71 | config.plugins.splice(selfIndex, 1) 72 | } else { 73 | // @ts-ignore 74 | config.plugins.splice(selfIndex, 1, plugin) 75 | } 76 | }, 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /packages/vite-html-plugin/README.md: -------------------------------------------------------------------------------- 1 | # vite-html-plugin 2 | 3 | This package is a new feature version of [vite-html](https://www.npmjs.com/package/vite-html) 4 | 5 | [![NPM version](https://img.shields.io/npm/v/vite-html-plugin.svg)](https://npmjs.org/package/vite-html-plugin) 6 | [![NPM Downloads](https://img.shields.io/npm/dm/vite-html-plugin.svg)](https://npmjs.org/package/vite-html-plugin) 7 | 8 | ## Features 9 | 10 | - Support [ejs](https://github.com/mde/ejs) template 11 | - Html entry alias 12 | - Inject js 13 | 14 | ## Usage 15 | 16 | Basic 17 | 18 | ```js 19 | import html from 'vite-html-plugin' 20 | export default { 21 | plugins: [ 22 | html(/* options | options[] */), 23 | ] 24 | } 25 | ``` 26 | 27 | Multi-Page 28 | 29 | ```tree 30 | ├─┬ public 31 | │ ├── foo.html 32 | │ └── bar.ejs.html 33 | │ 34 | ├─┬ src 35 | │ ├── foo.js 36 | │ └── bar.js 37 | │ 38 | └── vite.config.js 39 | ``` 40 | 41 | ```js 42 | html([ 43 | { 44 | // Equivalent to 45 | // { 'foo.html': 'public/foo.html' } 46 | template: 'public/foo.html', 47 | inject: '/src/foo.js', 48 | }, 49 | { 50 | template: { 51 | // Alias 52 | 'bar.html': 'public/bar.ejs.html', 53 | }, 54 | inject: '/src/bar.js', 55 | transformIndexHtml: () => ({ 56 | templateData: { 57 | // `ejs` template data 58 | user: { 59 | name: 'Kevin', 60 | age: '25', 61 | }, 62 | }, 63 | }), 64 | }, 65 | ]) 66 | ``` 67 | 68 | You can see 👉 [playground/vite-html-plugin](https://github.com/caoxiemeihao/vite-plugins/tree/main/playground/vite-html-plugin) 69 | 70 | ## API 71 | 72 | ```ts 73 | export interface Options { 74 | /** Value of script src */ 75 | inject?: string 76 | /** 77 | * e.g. 78 | * 79 | * - 'public/index.html' 80 | * - { 'index.html': 'public/index.html' } 81 | */ 82 | template?: string | { [entryAlias: string]: string } 83 | transformIndexHtml?: (html: string, ctx: IndexHtmlTransformContext) => string | void | { 84 | html?: string 85 | /** Data of lodash.template */ 86 | templateData?: Record 87 | /** 88 | * Options of lodash.template 89 | * @see https://lodash.com/docs/4.17.15#template 90 | */ 91 | templateOptions?: TemplateOptions 92 | } 93 | } 94 | ``` 95 | 96 | ## Limitation 97 | 98 | `ejs` templates must end with `.html`. Any other file types will be considered static files by Vite. 99 | 100 | You can see 👉 [path.extname(cleanedUrl) === '.html'](https://github.com/vitejs/vite/blob/344642ad630d8658308dbf707ed805cb04b49d58/packages/vite/src/node/server/middlewares/static.ts#L77) 101 | -------------------------------------------------------------------------------- /packages/vite-plugin-utils/function/index.ts: -------------------------------------------------------------------------------- 1 | 2 | export function cleanUrl(url: string) { 3 | const queryRE = /\?.*$/s 4 | const hashRE = /#.*$/s 5 | return url.replace(hashRE, '').replace(queryRE, '') 6 | } 7 | 8 | /** 9 | * @see https://github.com/rich-harris/magic-string 10 | */ 11 | export class MagicString { 12 | private overwrites: { loc: [number, number]; content: string }[] 13 | private starts = '' 14 | private ends = '' 15 | 16 | constructor( 17 | public str: string 18 | ) { } 19 | 20 | public append(content: string) { 21 | this.ends += content 22 | return this 23 | } 24 | 25 | public prepend(content: string) { 26 | this.starts = content + this.starts 27 | return this 28 | } 29 | 30 | public overwrite(start: number, end: number, content: string) { 31 | if (end < start) { 32 | throw new Error(`"end" con't be less than "start".`) 33 | } 34 | if (!this.overwrites) { 35 | this.overwrites = [] 36 | } 37 | this.overwrites.push({ loc: [start, end], content }) 38 | return this 39 | } 40 | 41 | public toString() { 42 | let str = this.str 43 | if (this.overwrites) { 44 | const arr = [...this.overwrites].sort((a, b) => b.loc[0] - a.loc[0]) 45 | for (const { loc: [start, end], content } of arr) { 46 | // TODO: check start or end overlap 47 | str = str.slice(0, start) + content + str.slice(end) 48 | } 49 | } 50 | return this.starts + str + this.ends 51 | } 52 | } 53 | 54 | /** 55 | * - `'' -> '.'` 56 | * - `foo` -> `./foo` 57 | */ 58 | export function relativeify(relative: string) { 59 | if (relative === '') { 60 | return '.' 61 | } 62 | if (!relative.startsWith('.')) { 63 | return './' + relative 64 | } 65 | return relative 66 | } 67 | 68 | /** 69 | * Ast tree walk 70 | */ 71 | export async function walk( 72 | ast: Record, 73 | visitors: { 74 | [type: string]: (node: Record) => void | Promise, 75 | }, 76 | ) { 77 | if (!ast) return 78 | 79 | if (Array.isArray(ast)) { 80 | for (const element of ast as Record[]) { 81 | await walk(element, visitors) 82 | } 83 | } else { 84 | for (const key of Object.keys(ast)) { 85 | await (typeof ast[key] === 'object' && walk(ast[key], visitors)) 86 | } 87 | } 88 | 89 | await visitors[ast.type]?.(ast) 90 | } 91 | walk.sync = function walkSync( 92 | ast: Record, 93 | visitors: { 94 | [type: string]: (node: Record) => void | Promise, 95 | }, 96 | ) { 97 | if (!ast) return 98 | 99 | if (Array.isArray(ast)) { 100 | for (const element of ast as Record[]) { 101 | walk.sync(element, visitors) 102 | } 103 | } else { 104 | for (const key of Object.keys(ast)) { 105 | typeof ast[key] === 'object' && walk.sync(ast[key], visitors) 106 | } 107 | } 108 | 109 | visitors[ast.type]?.(ast) 110 | } 111 | -------------------------------------------------------------------------------- /README1.md: -------------------------------------------------------------------------------- 1 | # vitejs-plugins 2 | 3 | ## 为社区尽一份绵薄之力 🔥 4 | 5 | --- 6 | 7 | ###### [vite-plugin-commonjs](packages/commonjs): Pure javascript vite plugin for support CommonJs 8 | 9 | [![NPM version](https://img.shields.io/npm/v/vite-plugin-commonjs.svg)](https://npmjs.org/package/vite-plugin-commonjs) 10 | [![NPM Downloads](https://img.shields.io/npm/dm/vite-plugin-commonjs.svg)](https://npmjs.org/package/vite-plugin-commonjs) 11 | 12 | - [x] `require` syntax. 13 | - [ ] `exports` syntax. 14 | 15 | ###### TODO: refactor with `esbuild` 16 | 17 | --- 18 | 19 | ###### [vite-plugin-dynamic-import](packages/dynamic-import): Supported use alias in dynamic import 20 | 21 | [![NPM version](https://img.shields.io/npm/v/vite-plugin-dynamic-import.svg)](https://npmjs.org/package/vite-plugin-dynamic-import) 22 | [![NPM Downloads](https://img.shields.io/npm/dm/vite-plugin-dynamic-import.svg)](https://npmjs.org/package/vite-plugin-dynamic-import) 23 | 24 | --- 25 | 26 | ###### [vitejs-plugin-electron](packages/electron): An vite plugin for Electron Renderer-process use NodeJs API 27 | 28 | [![NPM version](https://img.shields.io/npm/v/vitejs-plugin-electron.svg)](https://npmjs.org/package/vitejs-plugin-electron) 29 | [![NPM Downloads](https://img.shields.io/npm/dm/vitejs-plugin-electron.svg)](https://npmjs.org/package/vitejs-plugin-electron) 30 | 31 | > 🚧 Use Electron and NodeJs API in Renderer-porocess, `vite-plugin-electron-renderer` is better 32 | 33 | --- 34 | 35 | ###### [vite-plugin-electron-renderer](packages/electron-renderer): Use Electron and NodeJs API in Renderer-process 36 | 37 | [![NPM version](https://img.shields.io/npm/v/vite-plugin-electron-renderer.svg)](https://npmjs.org/package/vite-plugin-electron-renderer) 38 | [![NPM Downloads](https://img.shields.io/npm/dm/vite-plugin-electron-renderer.svg)](https://npmjs.org/package/vite-plugin-electron-renderer) 39 | 40 | - [x] use `import electron from 'electron'`, `import fs from 'fs'` in Renderer-process 41 | - [x] custom resolve code 42 | 43 | --- 44 | 45 | ###### [vite-plugin-fast-external](packages/fast-external): An tiny and fast external plugin for vite. 46 | 47 | [![NPM version](https://img.shields.io/npm/v/vite-plugin-fast-external.svg)](https://npmjs.org/package/vite-plugin-fast-external) 48 | [![NPM Downloads](https://img.shields.io/npm/dm/vite-plugin-fast-external.svg)](https://npmjs.org/package/vite-plugin-fast-external) 49 | 50 | --- 51 | 52 | ###### [vite-plugin-lang-jsx](packages/lang-jsx): Automatically add `lang="jsx"` attribute for when using vite-plugin-vue2 53 | 54 | [![NPM version](https://img.shields.io/npm/v/vite-plugin-lang-jsx.svg)](https://npmjs.org/package/vite-plugin-lang-jsx) 55 | [![NPM Downloads](https://img.shields.io/npm/dm/vite-plugin-lang-jsx.svg)](https://npmjs.org/package/vite-plugin-lang-jsx) 56 | 57 | --- 58 | 59 | ###### [vite-plugin-resolve](packages/resolve): Custom resolve code for vite 60 | 61 | [![NPM version](https://img.shields.io/npm/v/vite-plugin-resolve.svg)](https://npmjs.org/package/vite-plugin-resolve) 62 | [![NPM Downloads](https://img.shields.io/npm/dm/vite-plugin-resolve.svg)](https://npmjs.org/package/vite-plugin-resolve) 63 | 64 | - [x] external module in vite 65 | - [x] custom resolve code in vite 66 | - [x] support use in electron 67 | 68 | --- 69 | -------------------------------------------------------------------------------- /packages/vite-plugin-fast-external/README.zh-CN.md: -------------------------------------------------------------------------------- 1 | # vite-plugin-fast-external 2 | 3 | [![NPM version](https://img.shields.io/npm/v/vite-plugin-fast-external.svg)](https://npmjs.org/package/vite-plugin-fast-external) 4 | [![NPM Downloads](https://img.shields.io/npm/dm/vite-plugin-fast-external.svg)](https://npmjs.org/package/vite-plugin-fast-external) 5 | 6 | **[English](https://github.com/caoxiemeihao/vite-plugins/tree/main/packages/vite-plugin-fast-external#readme) | 简体中文** 7 | 8 | 📦 **开箱即用**, 内置 Vue, React, Antd, Element 等等 9 | 🚀 **高性能**, 不需要语法转换 10 | 🌱 支持自定义 external 代码段 11 | ✅ Browser, Node.js, Electron 12 | 13 | ## 安装 14 | 15 | ```bash 16 | npm i vite-plugin-fast-external -D 17 | ``` 18 | 19 | ## 使用 20 | 21 | 内置的一些常用的模块 22 | 23 | ```js 24 | import external from 'vite-plugin-fast-external' 25 | import { 26 | antd_vue_v1, 27 | antd_vue_v3, 28 | antd_v4, 29 | element_plus, 30 | element_ui, 31 | pinia_v2, 32 | react_dom_v17, 33 | react_dom_v18, 34 | react_router_dom_v5, 35 | react_router_dom_v6, 36 | react_router_v5, 37 | react_router_v6, 38 | react_v17, 39 | react_v18, 40 | redux_v5, 41 | vue_composition_api, 42 | vue_router_v4, 43 | vue_v2, 44 | vue_v3, 45 | vuex_v3, 46 | vuex_v4, 47 | } from 'vite-plugin-fast-external/presets' 48 | 49 | export default { 50 | plugins: [ 51 | external({ 52 | vue: vue_v3, 53 | // ...其他模块 54 | }), 55 | ], 56 | } 57 | ``` 58 | 59 | 在你的代码中使用 60 | 61 | ```js 62 | // Vue v3 63 | import { ref, reactive, watch } from 'vue' 64 | // ...其他模块 65 | ``` 66 | 67 | 如果你想修改内置模块 68 | 69 | ```ts 70 | import external from 'vite-plugin-fast-external' 71 | import { lib2external } from 'vite-plugin-fast-external/presets' 72 | import vue_v2 from 'vite-plugin-fast-external/presets/vue-v2' 73 | 74 | interface Vue_v2 extends LibMeta { 75 | name: string 76 | members: string[] 77 | } 78 | 79 | vue_v2.name = 'ExtendVue' 80 | vue_v2.members.push('ExtendAPI') 81 | 82 | export default { 83 | plugins: [ 84 | external({ 85 | vue: lib2external(vue_v2.name, vue_v2.members), 86 | // ...其他模块 87 | }), 88 | ], 89 | } 90 | ``` 91 | 92 | #### 自定义(高级部分) 93 | 94 | 使用 `lib2external` 95 | 96 | ```js 97 | import { lib2external } from 'vite-plugin-fast-external/presets' 98 | 99 | external({ 100 | module: lib2external('Module', [ 101 | 'member1', 102 | // ...其他成员 103 | ]), 104 | }) 105 | ``` 106 | 107 | 这相当于 108 | 109 | ```js 110 | external({ 111 | module: () => ` 112 | const M = window.Module; 113 | const D = M.default || M; 114 | export { D as default } 115 | export const member1 = M.member1; 116 | // ...其他成员 117 | `, 118 | }) 119 | ``` 120 | 121 | 加载文件。支持嵌套模块命名,支持返回 Promise 122 | 123 | ```js 124 | import fs from 'fs' 125 | 126 | external({ 127 | 'path/filename': () => fs.promise.readFile('path/filename', 'utf8'), 128 | }) 129 | ``` 130 | 131 | ## API 132 | 133 | `external(entries)` 134 | 135 | ```ts 136 | type entries = Record string | Promise)>; 137 | ``` 138 | 139 | ## 工作原理 140 | 141 | ```js 142 | external({ 143 | vue: 'Vue', 144 | // 这相当于 145 | // vue: () => `const M = window['Vue']; export { M as default }`, 146 | }) 147 | ``` 148 | 149 | 实际中,该插件会拦截你的 import 导入,并返回指定的代码段 150 | 让我们用 `external({ vue: 'Vue' })` 举个 🌰,实际上会生成如下代码 151 | 152 | ```js 153 | const M = window['Vue']; export { M as default } 154 | ``` 155 | -------------------------------------------------------------------------------- /packages/vite-plugin-fast-external/README.md: -------------------------------------------------------------------------------- 1 | # vite-plugin-fast-external 2 | 3 | [![NPM version](https://img.shields.io/npm/v/vite-plugin-fast-external.svg)](https://npmjs.org/package/vite-plugin-fast-external) 4 | [![NPM Downloads](https://img.shields.io/npm/dm/vite-plugin-fast-external.svg)](https://npmjs.org/package/vite-plugin-fast-external) 5 | 6 | **English | [简体中文](https://github.com/caoxiemeihao/vite-plugins/blob/main/packages/vite-plugin-fast-external/README.zh-CN.md)** 7 | 8 | 📦 **Out of the box**, built in Vue, React, Antd, Element and others 9 | 🚀 **High performance**, without lexical transform 10 | 🌱 Support custom external code 11 | ✅ Browser, Node.js, Electron 12 | 13 | ## Install 14 | 15 | ```bash 16 | npm i vite-plugin-fast-external -D 17 | ``` 18 | 19 | ## Usage 20 | 21 | You can easily use builtin modules 22 | 23 | ```js 24 | import external from 'vite-plugin-fast-external' 25 | import { 26 | antd_vue_v1, 27 | antd_vue_v3, 28 | antd_v4, 29 | element_plus, 30 | element_ui, 31 | pinia_v2, 32 | react_dom_v17, 33 | react_dom_v18, 34 | react_router_dom_v5, 35 | react_router_dom_v6, 36 | react_router_v5, 37 | react_router_v6, 38 | react_v17, 39 | react_v18, 40 | redux_v5, 41 | vue_composition_api, 42 | vue_router_v4, 43 | vue_v2, 44 | vue_v3, 45 | vuex_v3, 46 | vuex_v4, 47 | } from 'vite-plugin-fast-external/presets' 48 | 49 | export default { 50 | plugins: [ 51 | external({ 52 | vue: vue_v3, 53 | // ...others 54 | }), 55 | ], 56 | } 57 | ``` 58 | 59 | In your App 60 | 61 | ```js 62 | // Vue v3 63 | import { ref, reactive, watch } from 'vue' 64 | // ...others 65 | ``` 66 | 67 | If you want to modify the builtin module 68 | 69 | ```ts 70 | import external from 'vite-plugin-fast-external' 71 | import { lib2external } from 'vite-plugin-fast-external/presets' 72 | import vue_v2 from 'vite-plugin-fast-external/presets/vue-v2' 73 | 74 | interface Vue_v2 extends LibMeta { 75 | name: string 76 | members: string[] 77 | } 78 | 79 | vue_v2.name = 'ExtendVue' 80 | vue_v2.members.push('ExtendAPI') 81 | 82 | export default { 83 | plugins: [ 84 | external({ 85 | vue: lib2external(vue_v2.name, vue_v2.members), 86 | // ...others 87 | }), 88 | ], 89 | } 90 | ``` 91 | 92 | #### Customize (Advance) 93 | 94 | Use `lib2external` 95 | 96 | ```js 97 | import { lib2external } from 'vite-plugin-fast-external/presets' 98 | 99 | external({ 100 | module: lib2external('Module', [ 101 | 'member1', 102 | // ...others 103 | ]), 104 | }) 105 | ``` 106 | 107 | Be equivalent to 108 | 109 | ```js 110 | external({ 111 | module: () => ` 112 | const M = window.Module; 113 | const D = M.default || M; 114 | export { D as default } 115 | export const member1 = M.member1; 116 | // ...others 117 | `, 118 | }) 119 | ``` 120 | 121 | Load a file. Support nested module id and support return Promise 122 | 123 | ```js 124 | import fs from 'fs' 125 | 126 | external({ 127 | 'path/filename': () => fs.promise.readFile('path/filename', 'utf8'), 128 | }) 129 | ``` 130 | 131 | ## API 132 | 133 | `external(entries)` 134 | 135 | ```ts 136 | type entries = Record string | Promise)>; 137 | ``` 138 | 139 | ## How to work 140 | 141 | ```js 142 | external({ 143 | vue: 'Vue', 144 | // Be equivalent to 145 | // vue: () => `const M = window['Vue']; export { M as default }`, 146 | }) 147 | ``` 148 | 149 | In fact, the plugin will intercept your module import and return the specified code snippet 150 | Let's use `external({ vue: 'Vue' })` as an example, this will got the below code 151 | 152 | ```js 153 | const M = window['Vue']; export { M as default } 154 | ``` 155 | -------------------------------------------------------------------------------- /packages/vite-plugin-fast-external/presets/vue-v3.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @type {import('.').LibMeta} 3 | */ 4 | module.exports = { 5 | name: 'Vue', 6 | members: [ 7 | 'BaseTransition', 8 | 'Comment', 9 | 'EffectScope', 10 | 'Fragment', 11 | 'KeepAlive', 12 | 'ReactiveEffect', 13 | 'Static', 14 | 'Suspense', 15 | 'Teleport', 16 | 'Text', 17 | 'Transition', 18 | 'TransitionGroup', 19 | 'VueElement', 20 | 'callWithAsyncErrorHandling', 21 | 'callWithErrorHandling', 22 | 'camelize', 23 | 'capitalize', 24 | 'cloneVNode', 25 | 'compatUtils', 26 | 'compile', 27 | 'computed', 28 | 'createApp', 29 | 'createBlock', 30 | 'createCommentVNode', 31 | 'createElementBlock', 32 | 'createElementVNode', 33 | 'createHydrationRenderer', 34 | 'createPropsRestProxy', 35 | 'createRenderer', 36 | 'createSSRApp', 37 | 'createSlots', 38 | 'createStaticVNode', 39 | 'createTextVNode', 40 | 'createVNode', 41 | 'customRef', 42 | 'defineAsyncComponent', 43 | 'defineComponent', 44 | 'defineCustomElement', 45 | 'defineEmits', 46 | 'defineExpose', 47 | 'defineProps', 48 | 'defineSSRCustomElement', 49 | 'effect', 50 | 'effectScope', 51 | 'getCurrentInstance', 52 | 'getCurrentScope', 53 | 'getTransitionRawChildren', 54 | 'guardReactiveProps', 55 | 'h', 56 | 'handleError', 57 | 'hydrate', 58 | 'initCustomFormatter', 59 | 'initDirectivesForSSR', 60 | 'inject', 61 | 'isMemoSame', 62 | 'isProxy', 63 | 'isReactive', 64 | 'isReadonly', 65 | 'isRef', 66 | 'isRuntimeOnly', 67 | 'isShallow', 68 | 'isVNode', 69 | 'markRaw', 70 | 'mergeDefaults', 71 | 'mergeProps', 72 | 'nextTick', 73 | 'normalizeClass', 74 | 'normalizeProps', 75 | 'normalizeStyle', 76 | 'onActivated', 77 | 'onBeforeMount', 78 | 'onBeforeUnmount', 79 | 'onBeforeUpdate', 80 | 'onDeactivated', 81 | 'onErrorCaptured', 82 | 'onMounted', 83 | 'onRenderTracked', 84 | 'onRenderTriggered', 85 | 'onScopeDispose', 86 | 'onServerPrefetch', 87 | 'onUnmounted', 88 | 'onUpdated', 89 | 'openBlock', 90 | 'popScopeId', 91 | 'provide', 92 | 'proxyRefs', 93 | 'pushScopeId', 94 | 'queuePostFlushCb', 95 | 'reactive', 96 | 'readonly', 97 | 'ref', 98 | 'registerRuntimeCompiler', 99 | 'render', 100 | 'renderList', 101 | 'renderSlot', 102 | 'resolveComponent', 103 | 'resolveDirective', 104 | 'resolveDynamicComponent', 105 | 'resolveFilter', 106 | 'resolveTransitionHooks', 107 | 'setBlockTracking', 108 | 'setDevtoolsHook', 109 | 'setTransitionHooks', 110 | 'shallowReactive', 111 | 'shallowReadonly', 112 | 'shallowRef', 113 | 'ssrContextKey', 114 | 'ssrUtils', 115 | 'stop', 116 | 'toDisplayString', 117 | 'toHandlerKey', 118 | 'toHandlers', 119 | 'toRaw', 120 | 'toRef', 121 | 'toRefs', 122 | 'transformVNodeArgs', 123 | 'triggerRef', 124 | 'unref', 125 | 'useAttrs', 126 | 'useCssModule', 127 | 'useCssVars', 128 | 'useSSRContext', 129 | 'useSlots', 130 | 'useTransitionState', 131 | 'vModelCheckbox', 132 | 'vModelDynamic', 133 | 'vModelRadio', 134 | 'vModelSelect', 135 | 'vModelText', 136 | 'vShow', 137 | 'version', 138 | 'warn', 139 | 'watch', 140 | 'watchEffect', 141 | 'watchPostEffect', 142 | 'watchSyncEffect', 143 | 'withAsyncContext', 144 | 'withCtx', 145 | 'withDefaults', 146 | 'withDirectives', 147 | 'withKeys', 148 | 'withMemo', 149 | 'withModifiers', 150 | 'withScopeId', 151 | ], 152 | }; -------------------------------------------------------------------------------- /svg-gif.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 13 | 14 | 17 | 18 | 花有重开日,人无再少年 19 | 20 | 21 | 22 | 23 | 26 | 27 | 30 | 31 | 将相本无种,男儿当自强 32 | 33 | 34 | 35 | 36 | 39 | 40 | 43 | 44 | 满朝朱紫贵,尽是读书人 45 | 46 | 47 | 48 | 49 | 52 | 53 | 56 | 57 | 已识乾坤大,犹怜草木青 58 | 59 | 60 | 61 | 62 | 65 | 66 | 69 | 70 | 君子应知进退方,时机不到且隐藏 71 | 72 | 73 | 74 | 75 | 78 | 79 | 82 | 83 | 妆未梳成未见客,势弱稍时敛锋芒 84 | 85 | 86 | 87 | 88 | 91 | 92 | 95 | 96 | 曾经沧海难为水,除去巫山不是云 97 | 98 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /packages/vite-plugin-fast-external/presets/index.js: -------------------------------------------------------------------------------- 1 | const antd_vue_v1 = require('./ant-design-vue-v1'); 2 | const antd_vue_v3 = require('./ant-design-vue-v3'); 3 | const antd_v4 = require('./antd-v4'); 4 | const element_plus = require('./element-plus'); 5 | const element_ui = require('./element-ui'); 6 | const pinia_v2 = require('./pinia-v2'); 7 | const react_dom_v17 = require('./react-dom-v17'); 8 | const react_dom_v18 = require('./react-dom-v18'); 9 | const react_router_dom_v5 = require('./react-router-dom-v5'); 10 | const react_router_dom_v6 = require('./react-router-dom-v6'); 11 | const react_router_v5 = require('./react-router-v5'); 12 | const react_router_v6 = require('./react-router-v6'); 13 | const react_v17 = require('./react-v17'); 14 | const react_v18 = require('./react-v18'); 15 | const redux_v5 = require('./redux-v5'); 16 | const vue_composition_api = require('./vue-composition-api'); 17 | const vue_router_v4 = require('./vue-router-v4'); 18 | const vue_v2 = require('./vue-v2'); 19 | const vue_v3 = require('./vue-v3'); 20 | const vuex_v3 = require('./vuex-v3'); 21 | const vuex_v4 = require('./vuex-v4'); 22 | 23 | /** 24 | * @type {typeof import('.')['lib2external']} 25 | */ 26 | exports.lib2external = function (name, members) { 27 | const keywords = [ 28 | 'await', 29 | 'break', 30 | 'case', 31 | 'catch', 32 | 'class', 33 | 'const', 34 | 'continue', 35 | 'debugger', 36 | 'default', 37 | 'delete', 38 | 'do', 39 | 'else', 40 | 'enum', 41 | 'export', 42 | 'extends', 43 | 'false', 44 | 'finally', 45 | 'for', 46 | 'function', 47 | 'if', 48 | 'implements', 49 | 'import', 50 | 'in', 51 | 'instanceof', 52 | 'interface', 53 | 'let', 54 | 'new', 55 | 'null', 56 | 'package', 57 | 'private', 58 | 'protected', 59 | 'public', 60 | 'return', 61 | 'super', 62 | 'switch', 63 | 'static', 64 | 'this', 65 | 'throw', 66 | 'try', 67 | 'true', 68 | 'typeof', 69 | 'var', 70 | 'void', 71 | 'while', 72 | 'with', 73 | 'yield', 74 | ]; 75 | const exportMembers = members 76 | .filter(e => !keywords.includes(e)) 77 | .map(e => `export const ${e} = _M_.${e};`) 78 | .join('\n'); 79 | const externalTpl = ` 80 | const _M_ = window['${name}']; 81 | const _D_ = _M_.default || _M_; 82 | 83 | export { _D_ as default } 84 | ${exportMembers} 85 | `; 86 | 87 | return () => externalTpl; 88 | }; 89 | 90 | exports.antd_vue_v1 = this.lib2external( 91 | antd_vue_v1.name, 92 | antd_vue_v1.members, 93 | ); 94 | exports.antd_vue_v3 = this.lib2external( 95 | antd_vue_v3.name, 96 | antd_vue_v3.members, 97 | ); 98 | exports.antd_v4 = this.lib2external( 99 | antd_v4.name, 100 | antd_v4.members, 101 | ); 102 | exports.element_plus = this.lib2external( 103 | element_plus.name, 104 | element_plus.members, 105 | ); 106 | exports.element_ui = this.lib2external( 107 | element_ui.name, 108 | element_ui.members, 109 | ); 110 | exports.pinia_v2 = this.lib2external( 111 | pinia_v2.name, 112 | pinia_v2.members, 113 | ); 114 | exports.react_dom_v17 = this.lib2external( 115 | react_dom_v17.name, 116 | react_dom_v17.members, 117 | ); 118 | exports.react_dom_v18 = this.lib2external( 119 | react_dom_v18.name, 120 | react_dom_v18.members, 121 | ); 122 | exports.react_router_dom_v5 = this.lib2external( 123 | react_router_dom_v5.name, 124 | react_router_dom_v5.members, 125 | ); 126 | exports.react_router_dom_v6 = this.lib2external( 127 | react_router_dom_v6.name, 128 | react_router_dom_v6.members, 129 | ); 130 | exports.react_router_v5 = this.lib2external( 131 | react_router_v5.name, 132 | react_router_v5.members, 133 | ); 134 | exports.react_router_v6 = this.lib2external( 135 | react_router_v6.name, 136 | react_router_v6.members, 137 | ); 138 | exports.react_v17 = this.lib2external( 139 | react_v17.name, 140 | react_v17.members, 141 | ); 142 | exports.react_v18 = this.lib2external( 143 | react_v18.name, 144 | react_v18.members, 145 | ); 146 | exports.redux_v5 = this.lib2external( 147 | redux_v5.name, 148 | redux_v5.members, 149 | ); 150 | exports.vue_composition_api = this.lib2external( 151 | vue_composition_api.name, 152 | vue_composition_api.members, 153 | ); 154 | exports.vue_router_v4 = this.lib2external( 155 | vue_router_v4.name, 156 | vue_router_v4.members, 157 | ); 158 | exports.vue_v2 = this.lib2external( 159 | vue_v2.name, 160 | vue_v2.members, 161 | ); 162 | exports.vue_v3 = this.lib2external( 163 | vue_v3.name, 164 | vue_v3.members, 165 | ); 166 | exports.vuex_v3 = this.lib2external( 167 | vuex_v3.name, 168 | vuex_v3.members, 169 | ) 170 | exports.vuex_v4 = this.lib2external( 171 | vuex_v4.name, 172 | vuex_v4.members, 173 | ) -------------------------------------------------------------------------------- /packages/vite-plugin-utils/sort-plugin/index.txt: -------------------------------------------------------------------------------- 1 | import type { 2 | UserConfig, 3 | Plugin, 4 | PluginOption, 5 | } from 'vite' 6 | 7 | /** 8 | * 'vite-plugin-dynamic-import' can only transform JavaScript. 9 | * So it should be put behind some known plugins. 10 | */ 11 | /* 12 | 🚨 Does not works 13 | export function sortPlugin(toSortPlugin: string, config: UserConfig): UserConfig { 14 | const KNOWN_PLUGINS = { 15 | '@vitejs/plugin-vue': 'vite:vue', 16 | 'vite-plugin-vue2': 'vite-plugin-vue2', 17 | '@vitejs/plugin-vue-jsx': 'vite:vue-jsx', 18 | '@sveltejs/vite-plugin-svelte': 'vite-plugin-svelte', 19 | '@vitejs/plugin-react': [ 20 | 'vite:react-babel', 21 | 'vite:react-refresh', 22 | 'vite:react-jsx', 23 | ], 24 | } 25 | 26 | const plugins = [...config.plugins] as Plugin[] 27 | const knownNames = Object.values(KNOWN_PLUGINS).flat() 28 | const pluginNames = plugins.map(plugin => plugin.name) 29 | 30 | // Find the last known plugin 31 | let orderIndex = [...pluginNames].reverse().findIndex(name => knownNames.includes(name)) 32 | 33 | if (orderIndex !== -1) { 34 | // In the correct position in the array 35 | orderIndex = pluginNames.length - 1 - orderIndex 36 | 37 | const pluginIndex = pluginNames.findIndex(name => name === toSortPlugin) 38 | if (pluginIndex < orderIndex) { 39 | // It is located before a known plugin 40 | // Move it to after known plugins 41 | plugins.splice(orderIndex, 0, plugins.splice(pluginIndex, 1)[0]) 42 | } 43 | config.plugins = plugins 44 | return config 45 | } 46 | } 47 | */ 48 | 49 | export function sortPlugin(vitePlugin: Plugin, pluginNames: string[] = []): Plugin { 50 | const name = `${vitePlugin.name}:sorter` 51 | const KNOWN_PLUGINS = { 52 | '@vitejs/plugin-vue': 'vite:vue', 53 | 'vite-plugin-vue2': 'vite-plugin-vue2', 54 | '@vitejs/plugin-vue-jsx': 'vite:vue-jsx', 55 | '@sveltejs/vite-plugin-svelte': 'vite-plugin-svelte', 56 | '@vitejs/plugin-react': [ 57 | 'vite:react-babel', 58 | 'vite:react-refresh', 59 | 'vite:react-jsx', 60 | ], 61 | } 62 | const knownNames = Object.values(KNOWN_PLUGINS).flat().concat(pluginNames) 63 | 64 | return { 65 | name, 66 | // 🚨 Does not works 67 | config(config) { 68 | let indexI: number 69 | let indexJ: number 70 | // find from tail 71 | for (let maxIdx = config.plugins.length - 1, i = maxIdx; i >= 0; i--) { 72 | const pluginOpts = config.plugins[i] 73 | let j = -1 74 | if (Array.isArray(pluginOpts)) { 75 | // find from tail 76 | for (let _maxIdx = pluginOpts.length - 1, _j = _maxIdx; _j >= 0; _j--) { 77 | const plugin = pluginOpts[_j] 78 | if (plugin && knownNames.includes(plugin.name)) { 79 | j = _maxIdx - _j 80 | break 81 | } 82 | } 83 | if (j > -1) { 84 | indexI = maxIdx - i 85 | indexJ = j 86 | break 87 | } 88 | } else if (pluginOpts) { 89 | if (knownNames.includes(pluginOpts.name)) { 90 | indexI = maxIdx - i 91 | break 92 | } 93 | } 94 | } 95 | 96 | if (typeof indexI === 'undefined') { 97 | config.plugins = config.plugins.map(pluginOpt => { 98 | if (!pluginOpt || Array.isArray(pluginOpt)) { 99 | return pluginOpt 100 | } 101 | if (pluginOpt.name === name) { 102 | return vitePlugin 103 | } 104 | }) 105 | } else { 106 | // filter out the plugin itself 107 | config.plugins = config.plugins.filter((e: any) => (e && e.name === name) ? false : true) 108 | config.plugins = config.plugins.reduce((memo, item, i) => { 109 | if (i === indexI) { 110 | if (typeof indexJ !== 'undefined') { 111 | const tmp = (item as PluginOption[]).reduce((_memo, _item, j) => { 112 | if (j === indexJ) { 113 | return _memo.concat([_item, vitePlugin]) 114 | } 115 | return _memo.concat(_item) 116 | }, []) 117 | return memo.concat(tmp) 118 | } 119 | return memo.concat([item as PluginOption, vitePlugin]) 120 | } 121 | 122 | return memo.concat(item) 123 | }, []) 124 | } 125 | 126 | return config 127 | }, 128 | // 🎉 This worked! 129 | async configResolved(config) { 130 | await vitePlugin.configResolved?.call(this, config) 131 | 132 | const resolvedNames = config.plugins.map(p => p.name) 133 | // Find the last known plugin 134 | const lastIndex = [...resolvedNames].reverse().findIndex(rn => knownNames.includes(rn)) 135 | if (lastIndex > -1) { 136 | const index = resolvedNames.length - 1 - lastIndex 137 | 138 | // Move it to after known plugins 139 | // @ts-ignore 140 | config.plugins.splice(index + 1, 0, vitePlugin) 141 | // Filter out the plugin itself 142 | // @ts-ignore 143 | config.plugins.splice(config.plugins.findIndex(p => p.name === name), 1) 144 | } else { 145 | // Filter out the plugin itself 146 | // @ts-ignore 147 | config.plugins.splice(config.plugins.findIndex(p => p.name === name), 1, vitePlugin) 148 | } 149 | }, 150 | } 151 | } 152 | -------------------------------------------------------------------------------- /README2.md: -------------------------------------------------------------------------------- 1 | ![黑发不知勤学早,白首方悔读书迟](https://github.com/caoxiemeihao/vite-plugins/blob/main/svg-gif.svg) 2 | 3 | --- 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 21 | 29 | 30 | 31 | 34 | 39 | 47 | 48 | 49 | 52 | 57 | 65 | 66 | 67 | 70 | 75 | 83 | 84 | 85 | 88 | 93 | 101 | 102 | 103 | 106 | 107 | 115 | 116 | 117 | 120 | 125 | 133 | 134 | 135 |
NameDescriptionNpm
14 | vite-plugin-resolve 15 | 17 | Custom resolve code for vite 18 |
19 | Migrated 👉 vite-plugin/vite-plugin-resolve 20 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
32 | vite-plugin-commonjs 33 | 35 | A pure JavaScript implementation of vite-plugin-commonjs 36 |
37 | Migrated 👉 vite-plugin/vite-plugin-commonjs 38 |
40 | 41 | 42 | 43 | 44 | 45 | 46 |
50 | vite-plugin-dynamic-import 51 | 53 | Enhance the builtin dynamic import plugin of Vite 54 |
55 | Migrated 👉 vite-plugin/vite-plugin-dynamic-import 56 |
58 | 59 | 60 | 61 | 62 | 63 | 64 |
68 | vite-plugin-optimizer 69 | 71 | Manually Pre-Bundling of Vite 72 |
73 | Migrated 👉 vite-plugin/vite-plugin-optimizer 74 |
76 | 77 | 78 | 79 | 80 | 81 | 82 |
86 | vite-plugin-esmodule 87 | 89 | Build ES module to CommonJs module for Node.js 90 |
91 | Migrated 👉 vite-plugin/vite-plugin-esmodule 92 |
94 | 95 | 96 | 97 | 98 | 99 | 100 |
104 | vite-plugin-fast-external 105 | Without lexical transform, support custom external code 108 | 109 | 110 | 111 | 112 | 113 | 114 |
118 | vite-plugin-lang-jsx 119 | 121 | Automatically add lang="jsx" attribute for when using vite-plugin-vue2 122 |
123 | Migrated 👉 vite-plugin/vite-plugin-lang-jsx 124 |
126 | 127 | 128 | 129 | 130 | 131 | 132 |
136 | -------------------------------------------------------------------------------- /symbol.txt: -------------------------------------------------------------------------------- 1 | 箭头符号 2 | 3 | ↑ ↓ ← → ↖ ↗ ↙ ↘ ↔ ↕ ➻ ➼ ➽ ➸ ➳ ➺ ➻ ➴ ➵ ➶ ➷ ➹ 4 | 5 | ▶ ➩ ➪ ➫ ➬ ➭ ➮➯ ➱ ➲ ➾ ➔ ➘ ➙ ➚ ➛ ➜ 6 | 7 | ➝ ➞ ➟ ➠ ➡ ➢ ➣ ➤ ➥ ➦ ➧ ➨ ↚ ↛ ↜ ↝ ↞ ↟ ↠ ↠ ↡ 8 | 9 | ↢ ↣ ↤ ↤ ↥ ↦ ↧ ↨ ⇄ ⇅ ⇆ ⇇ ⇈ ⇉ ⇊ ⇋ ⇌ ⇍ ⇎ ⇏ ⇐ ⇑ ⇒ ⇓ 10 | 11 | ⇔ ⇖ ⇗ ⇘ ⇙ ⇜ ↩ ↪ ↫ ↬ ↭ ↮ ↯ ↰ ↱ ↲ ↳ ↴ ↵ ↶ ↷ ↸ ↹ 12 | 13 | ☇☈ ↼ ↽ ↾ ↿ ⇀ ⇁ ⇂ ⇃ ⇞ ⇟ ⇠ ⇡ ⇢ ⇣ ⇤ ⇥ ⇦ ⇧ ⇨ ⇩ ⇪ ↺ ↻ 14 | 15 | 16 | 贴图字符大全 17 | A、希腊字母大写 ΑΒΓΔΕΖΗΘΙΚ∧ΜΝΞΟ∏Ρ∑ΤΥΦΧΨΩ 18 | B、希腊字母小写 α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ σ 19 | 20 | τ υ φ χ ψ ω 21 | C、俄文字母大写 АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩ 22 | 23 | ЪЫЬЭЮЯ 24 | D、俄文字母小写 а б в г д е ё ж з и й к л м н о п р 25 | 26 | с т у ф х ц ч ш щ ъ ы ь э ю я 27 | E、注音符号 ㄅㄉㄓㄚㄞㄢㄦㄆㄊㄍㄐㄔㄗㄧㄛㄟㄣㄇㄋㄎㄑㄕㄘㄨㄜㄠㄤㄈㄏ 28 | 29 | ㄒㄖㄙㄩㄝㄡㄥ 30 | F、拼音 ā á ǎ à、ō ó ǒ ò、ê ē é ě è、ī í ǐ ì、ū ú ǔ ù、ǖ ǘ ǚ ǜ ü 31 | G、日文平假名 ぁぃぅぇぉかきくけこんさしすせそたちつってとゐなにぬね 32 | 33 | のはひふへほゑまみむめもゃゅょゎを 34 | H、日文片假名 ァィゥヴェォカヵキクケヶコサシスセソタチツッテトヰンナ 35 | 36 | ニヌネノハヒフヘホヱマミムメモャュョヮヲ 37 | I、标点符号 ˉˇ¨‘’々~‖∶”’‘|〃〔〕《》「」『』.〖〗【【】 38 | 39 | ()〔〕{} 40 | J、数字序号 ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫ①②③④⑤⑥⑦⑧⑨⑩一二三四五六七 41 | 42 | 八九十 43 | K、数学符号 ≈≡≠=≤≥<>≮≯∷±+-×÷/∫∮∝∞∧∨∑∏∪∩∈∵ 44 | 45 | ∴⊥‖∠⌒⊙≌∽√ 46 | L、单位符号 °′〃$£¥‰%℃¤¢ 47 | M、制表符 ┌┍┎┏┐┑┒┓—┄┈├┝┞┟┠┡┢┣|┆┊┬┭┮┯┰┱┲┳ 48 | 49 | ┼┽┾┿╀╂╁╃ 50 | N、特殊符号 §№☆★○●◎◇◆□■△▲※→←↑↓〓#&@\^_ 51 | O、补充收集 ⊙●○①⊕◎Θ⊙¤㊣▂ ▃ ▄ ▅ ▆ ▇ █ █ ■ ▓ 回 □ 〓 52 | 53 | ≡ ╝╚╔ ╗╬ ═ ╓ ╩ ┠ ┨┯ ┷┏ ┓┗ ┛┳⊥『』┌♀◆◇◣◢◥▲▼△▽⊿ 54 | 55 | *标点符号:.。,、;:?!ˉˇ¨`~ 々~‖∶"'`|·… — ~ - 〃 56 | 57 | ‘’“”〝〞〔〕〈〉《》「」『』〖〗【】()[]{}︻︼﹄﹃ 58 | 59 | *数学符号:+-×÷﹢﹣±/= ∥∠ ≌ ∽ ≦ ≧ ≒﹤﹥ ≈ ≡ ≠ = 60 | 61 | ≤ ≥ < > ≮ ≯ 62 | 63 | ∷ ∶ ∫ ∮ ∝ ∞ ∧ ∨ ∑ ∏ ∪ ∩ ∈ ∵ ∴ ⊥ ∥ ∠ ⌒ ⊙ √∟ 64 | 65 | ⊿ ㏒ ㏑ % ‰ 66 | 67 | *单位符号:㎎ ㎏ ㎜ ㎝ ㎞㎡㏄ ㏎ ㏑ ㏒ ㏕ ℡ % ‰ ℃ ℉ °′″$ 68 | 69 | £ ¥ ¢ ♂ ♀℅ 70 | 71 | *数字序号:① ② ③ ④ ⑤ ⑥ ⑦ ⑧ ⑨ ⑩ ㈠ ㈡ ㈢ ㈣ ㈤ ㈥ ㈦ ㈧ 72 | 73 | ㈨ ㈩ № 74 | 75 | ⑴ ⑵ ⑶ ⑷ ⑸ ⑹ ⑺ ⑻ ⑼ ⑽ ⑾ ⑿ ⒀ ⒁ ⒂ ⒃ ⒄ ⒅ ⒆ ⒇ 76 | 77 | ⒈ ⒉ ⒊ ⒋ ⒌ ⒍ ⒎ ⒏ ⒐ ⒑ ⒒ ⒓ ⒔ ⒕ ⒖ ⒗ ⒘ ⒙ ⒚ ⒛ 78 | 79 | Ⅰ Ⅱ Ⅲ Ⅳ Ⅴ Ⅵ Ⅶ Ⅷ Ⅸ Ⅹ Ⅺ Ⅻ ⅰ ⅱ ⅲ ⅳ ⅴ ⅵ ⅶ ⅷ ⅸ ⅹ 80 | 81 | *希腊字母:Α Β Γ Δ Ε Ζ Η Θ Ι Κ Λ Μ Ν Ξ Ο Π Ρ Σ 82 | 83 | Τ Υ Φ Χ Ψ Ω 84 | 85 | α β γ δ ε ζ ν ξ ο π ρ σ η θ ι κ λ μ τ υ φ χ 86 | 87 | ψ ω 88 | 89 | *俄语字符:А Б В Г Д Е Ё Ж З И Й К Л М Н О П Р 90 | 91 | С Т У Ф Х Ц Ч Ш Щ Ъ Ы Ь Э Ю Я 92 | 93 | а б в г д е ё ж з и й к л м н о п р с т у ф 94 | 95 | х ц ч ш щ ъ ы ь э ю я 96 | 97 | *汉语拼音:ā á ǎ à ō ó ǒ ò ē é ě è ī í ǐ ì ū ú ǔ ù ǖ ǘ ǚ ǜ ü ê ɑ 98 | 99 |  ń ň ǹ ɡ 100 | 101 | ㄅㄆㄇㄈㄉㄊㄋㄌㄍㄎㄏㄐㄑㄒㄓㄔㄕㄖㄗㄘㄙㄚㄛㄜㄝㄞㄟㄠㄡㄢㄣㄤㄥ 102 | 103 | ㄦㄧㄨㄩ 104 | 105 | *中文字符: 106 | 107 | 偏旁部首:横起:夬丅乛 竖起:丄丩乚 撇起:夊亅亇厃々 捺起:丂 108 | 109 | 零 壹 贰 叁 肆 伍 陆 柒 捌玖拾 佰 仟 万 亿 吉 太 拍 艾 分 厘 毫 微 110 | 111 | 卍 卐 卄 巜 弍 弎 弐 朤 氺曱甴 囍 兀 々 〆 の ぁ 〡 〢 〣 〤 〥 〦 〧 〨〩 112 | 113 | *日语:ぁあぃいぅうぇえぉおかがきぎくぐけげこごさざしじすずせぜそ 114 | 115 | ぞただちぢっつづてでとどなにぬねのはばぱひびぴふぶぷへべぺほぼぽまみむめもゃやゅゆょよらりるれろゎわゐゑをん 116 | 117 | *注音码:ァアィイゥウェエォオカガキギクグケゲコゴサザシジスズセゼ 118 | 119 | ソゾタダチヂッツヅテデトドナニヌネノハバパヒビピフブプヘベペホボポマミムメモャヤュユョヨラリルレロヮワヰヱヲンヴヵヶ 120 | 121 | *绘表符号:─━│┃┄┅┆┇┈┉┊┋┌┍┎┏┐┑┒┓└┕┖┗┘┙┚┛ 122 | 123 | ├┝┞┟┠┡┢┣┤┥┦┧┨┩┪┫┬┭┮┯┰┱┲┳┴┵┶┷┸┹┺┻ 124 | 125 | ┼┽┾┿╀╁╂╃╄╅╆╇╈╉╊╋ 126 | 127 | ═║╒╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡╢╣╤╥╦╧╨╩╪╫╬╳ 128 | 129 | ╔ ╗╝╚ ╬ ═ ╓ ╩ ┠ ┨┯ ┷┏ ┓┗ ┛┳⊥﹃﹄┌╭╮╯╰ 130 | 131 | 表情符号:*^_^* ^*^ ^-^ ^_^ ^︵^ 132 | 133 | *经典字符全收集:、。·ˉˇ¨〃々—~‖…‘’“”〔〕〈〉《 134 | 135 | 单引号‘ ’ ——‘党建红’促‘教育蓝’ 136 | 137 | ⁰ ¹ ² ³ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹ ⁺ ⁻ ⁼ ⁽ ⁾ ⁿ ₀ ₁ ₂ ₃ ₄ ₅ ₆ ₇ ₈ ₉ ₊ ₋ ₌ ₍ ₎ ₐ ₑ ₒ ₓ ₔ ₕ ₖ ₗ ₘ ₙ ₚ ₛ ₜ 138 | 139 | ❤❥웃유♋☮✌☏☢☠✔☑♚▲♪✈✞÷↑↓◆◇⊙■□△▽¿─│♥❣♂♀☿Ⓐ✍✉☣☤✘☒♛▼♫⌘☪≈←→◈◎☉★☆⊿※¡━┃♡ღツ☼☁❅♒✎©®™Σ✪✯☭➳卐√↖↗●◐Θ◤◥︻〖〗┄┆℃℉°✿ϟ☃☂✄¢€£∞✫★½✡×↙↘○◑⊕◣◢︼【】┅┇☽☾✚〓▂▃▄▅▆▇█▉▊▋▌▍▎▏↔↕☽☾の•▸◂▴▾┈┊①②③④⑤⑥⑦⑧⑨⑩ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩ㍿▓♨♛❖♓☪✙┉┋☹☺☻ ヅツッシÜϡﭢ™℠℗©®♥❤❥❣❦❧♡ 웃유ღ♋♂♀☿☼☀☁☂☄☾☽❄☃☈⊙☉℃℉❅✺ϟ☇♤♧♡♢♠♣♥♦☜☞☝✍☚☛☟✌✽✾✿❁❃❋❀⚘☑✓✔√☐☒✗✘ㄨ✕✖✖⋆✢✣✤✥❋✦✧✩✰✪✫✬✭✮✯❂✡★✱✲✳✴✵✶✷✸✹✺✻✼❄❅❆❇❈❉❊†☨✞✝☥☦☓☩☯☧☬☸✡♁✙♆。,、':∶;?‘’“”〝〞ˆˇ﹕︰﹔﹖﹑•¨….¸;!´?!~—ˉ|‖"〃`@﹫¡¿﹏﹋﹌︴々﹟#﹩$﹠&﹪%*﹡﹢﹦﹤‐ ̄¯―﹨ˆ˜﹍﹎+=<__-\ˇ~﹉﹊()〈〉‹›﹛﹜『』〖〗[]《》〔〕{}「」【】︵︷︿︹︽_﹁﹃︻︶︸﹀︺︾ˉ﹂﹄︼☩☨☦✞✛✜✝✙✠✚†‡◉○◌◍◎●◐◑◒◓◔◕◖◗❂☢⊗⊙◘◙◍⅟½⅓⅕⅙⅛⅔⅖⅚⅜¾⅗⅝⅞⅘≂≃≄≅≆≇≈≉≊≋≌≍≎≏≐≑≒≓≔≕≖≗≘≙≚≛≜≝≞≟≠≡≢≣≤≥≦≧≨≩⊰⊱⋛⋚∫∬∭∮∯∰∱∲∳%℅‰‱㊣㊎㊍㊌㊋㊏㊐㊊㊚㊛㊤㊥㊦㊧㊨㊒㊞㊑㊒㊓㊔㊕㊖㊗㊘㊜㊝㊟㊠㊡㊢㊩㊪㊫㊬㊭㊮㊯㊰㊙㉿囍♔♕♖♗♘♙♚♛♜♝♞♟ℂℍℕℙℚℝℤℬℰℯℱℊℋℎℐℒℓℳℴ℘ℛℭ℮ℌℑℜℨ♪♫♩♬♭♮♯°øⒶ☮✌☪✡☭✯卐✐✎✏✑✒✍✉✁✂✃✄✆✉☎☏➟➡➢➣➤➥➦➧➨➚➘➙➛➜➝➞➸♐➲➳⏎➴➵➶➷➸➹➺➻➼➽←↑→↓↔↕↖↗↘↙↚↛↜↝↞↟↠↡↢↣↤↥↦↧↨➫➬➩➪➭➮➯➱↩↪↫↬↭↮↯↰↱↲↳↴↵↶↷↸↹↺↻↼↽↾↿⇀⇁⇂⇃⇄⇅⇆⇇⇈⇉⇊⇋⇌⇍⇎⇏⇐⇑⇒⇓⇔⇕⇖⇗⇘⇙⇚⇛⇜⇝⇞⇟⇠⇡⇢⇣⇤⇥⇦⇧⇨⇩⇪➀➁➂➃➄➅➆➇➈➉➊➋➌➍➎➏➐➑➒➓㊀㊁㊂㊃㊄㊅㊆㊇㊈㊉ⒶⒷⒸⒹⒺⒻⒼⒽⒾⒿⓀⓁⓂⓃⓄⓅⓆⓇⓈⓉⓊⓋⓌⓍⓎⓏⓐⓑⓒⓓⓔⓕⓖⓗⓘⓙⓚⓛⓜⓝⓞⓟⓠⓡⓢⓣⓤⓥⓦⓧⓨⓩ⒜⒝⒞⒟⒠⒡⒢⒣⒤⒥⒦⒧⒨⒩⒪⒫⒬⒭⒮⒯⒰⒱⒲⒳⒴⒵ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫⅬⅭⅮⅯⅰⅱⅲⅳⅴⅵⅶⅷⅸⅹⅺⅻⅼⅽⅾⅿ┌┍┎┏┐┑┒┓└┕┖┗┘┙┚┛├┝┞┟┠┡┢┣┤┥┦┧┨┩┪┫┬┭┮┯┰┱┲┳┴┵┶┷┸┹┺┻┼┽┾┿╀╁╂╃╄╅╆╇╈╉╊╋╌╍╎╏═║╒╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡╢╣╤╥╦╧╨╩╪╫╬◤◥◄►▶◀◣◢▲▼◥▸◂▴▾△▽▷◁⊿▻◅▵▿▹◃❏❐❑❒▀▁▂▃▄▅▆▇▉▊▋█▌▍▎▏▐░▒▓▔▕■□▢▣▤▥▦▧▨▩▪▫▬▭▮▯㋀㋁㋂㋃㋄㋅㋆㋇㋈㋉㋊㋋㏠㏡㏢㏣㏤㏥㏦㏧㏨㏩㏪㏫㏬㏭㏮㏯㏰㏱㏲㏳㏴㏵㏶㏷㏸㏹㏺㏻㏼㏽㏾㍙㍚㍛㍜㍝㍞㍟㍠㍡㍢㍣㍤㍥㍦㍧㍨㍩㍪㍫㍬㍭㍮㍯㍰㍘☰☲☱☴☵☶☳☷☯ 140 | 141 | ♠♣♧♡♥❤❥❣♂♀✲☀☼☾☽◐◑☺☻☎☏✿❀№↑↓←→√×÷★℃℉°◆◇⊙■□△▽¿½☯✡㍿卍卐♂♀✚〓㎡♪♫♩♬㊚㊛囍㊒㊖Φ♀♂‖$@*&#※卍卐Ψ♫♬♭♩♪♯♮⌒¶∮‖€£¥$ 142 | 143 | ①②③④⑤⑥⑦⑧⑨⑩⑪⑫⑬⑭⑮⑯⑰⑱⑲⑳⓪⓿❶❷❸❹❺❻❼❽❾❿⓫⓬⓭⓮⓯⓰⓱⓲⓳⓴⓵⓶⓷⓸⓹⓺⓻⓼⓽⓾㊀㊁㊂㊃㊄㊅㊆㊇㊈㊉㈠㈡㈢㈣㈤㈥㈦㈧㈨㈩⑴⑵⑶⑷⑸⑹⑺⑻⑼⑽⑾⑿⒀⒁⒂⒃⒄⒅⒆⒇⒈⒉⒊⒋⒌⒍⒎⒏⒐⒑⒒⒓⒔⒕⒖⒗⒘⒙⒚⒛ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫⅰⅱⅲⅳⅴⅵⅶⅷⅸⅹⒶⒷⒸⒹⒺⒻⒼⒽⒾⒿⓀⓁⓂⓃⓄⓅⓆⓇⓈⓉⓊⓋⓌⓍⓎⓏⓐⓑⓒⓓⓔⓕⓖⓗⓘⓙⓚⓛⓜⓝⓞⓟⓠⓡⓢⓣⓤⓥⓦⓧⓨⓩ⒜⒝⒞⒟⒠⒡⒢⒣⒤⒥⒦⒧⒨⒩⒪⒫⒬⒭⒮⒯⒰⒱⒲⒳⒴⒵ 144 | 145 | ﹢﹣×÷±+-*/^=≌∽≦≧≒﹤﹥≈≡≠≤≥≮≯∷∶∝∞∧∨∑∏∪∩∈∵∴⊥∥∠⌒⊙√∛∜∟⊿㏒㏑%‰⅟½⅓⅕⅙⅐⅛⅑⅒⅔¾⅖⅗⅘⅚⅜⅝⅞≂≃≄≅≆≇≉≊≋≍≎≏≐≑≓≔≕≖≗≘≙≚≛≜≝≞≟≢≣≨≩⊰⊱⋛⋚∫∮∬∭∯∰∱∲∳℅øπ∀∁∂∃∄∅∆∇∉∊∋∌∍∎∐−∓∔∕∖∗∘∙∡∢∣∤∦∸∹∺∻∼∾∿≀≁≪≫≬≭≰≱≲≳≴≵≶≷≸≹≺≻≼≽≾≿⊀⊁⊂⊃⊄⊅⊆⊇⊈⊉⊊⊋⊌⊍⊎⊏⊐⊑⊒⊓⊔⊕⊖⊗⊘⊚⊛⊜⊝⊞⊟⊠⊡⊢⊣⊤⊦⊧⊨⊩⊪⊫⊬⊭⊮⊯⊲⊳⊴⊵⊶⊷⊸⊹⊺⊻⊼⊽⊾⋀⋁⋂⋃⋄⋅⋆⋇⋈⋉⋊⋋⋌⋍⋎⋏⋐⋑⋒⋓⋔⋕⋖⋗⋘⋙⋜⋝⋞⋟⋠⋡⋢⋣⋤⋥⋦⋧⋨⋩⋪⋫⋬⋭⋮⋯⋰⋱⋲⋳⋴⋵⋶⋷⋸⋹⋺⋻⋼⋽⋾⋿ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫⅬⅭⅮⅯↁↂↃↅↆↇↈ↉↊↋■□▢▣▤▥▦▧▨▩▪▫▬▭▮▯▰▱▲△▴▵▶▷▸▹►▻▼▽▾▿◀◁◂◃◄◅◆◇◈◉◊○◌◍◎●◐◑◒◓◔◕◖◗◘◙◚◛◜◝◞◟◠◡◢◣◤◥◦◧◨◩◪◫◬◭◮◯◰◱◲◳◴◵◶◷◸◹◺◿◻◼◽◾⏢⏥⌓⌔⌖ 146 | 147 | ♥❣ღ♠♡♤❤❥ 148 | 149 | ↑↓←→↖↗↘↙↔↕➻➼➽➸➳➺➻➴➵➶➷➹▶►▷◁◀◄«»➩➪➫➬➭➮➯➱⏎➲➾➔➘➙➚➛➜➝➞➟➠➡➢➣➤➥➦➧➨↚↛↜↝↞↟↠↠↡↢↣↤↤↥↦↧↨⇄⇅⇆⇇⇈⇉⇊⇋⇌⇍⇎⇏⇐⇑⇒⇓⇔⇖⇗⇘⇙⇜↩↪↫↬↭↮↯↰↱↲↳↴↵↶↷↸↹☇☈↼↽↾↿⇀⇁⇂⇃⇞⇟⇠⇡⇢⇣⇤⇥⇦⇧⇨⇩⇪↺↻⇚⇛♐ 150 | 151 | ✐✎✏✑✒✍✉✁✂✃✄✆✉☎☏☑✓✔√☐☒✗✘ㄨ✕✖✖☢☠☣✈★☆✡囍㍿☯☰☲☱☴☵☶☳☷☜☞☝✍☚☛☟✌♤♧♡♢♠♣♥♦☀☁☂❄☃♨웃유❖☽☾☪✿♂♀✪✯☭➳卍卐√×■◆●○◐◑✙☺☻❀⚘♔♕♖♗♘♙♚♛♜♝♞♟♧♡♂♀♠♣♥❤☜☞☎☏⊙◎☺☻☼▧▨♨◐◑↔↕▪▒◊◦▣▤▥▦▩◘◈◇♬♪♩♭♪の★☆→あぃ£Ю〓§♤♥▶¤✲❈✿✲❈➹☀☂☁【】┱┲❣✚✪✣✤✥✦❉❥❦❧❃❂❁❀✄☪☣☢☠☭ღ▶▷◀◁☀☁☂☃☄★☆☇☈⊙☊☋☌☍ⓛⓞⓥⓔ╬『』∴☀♫♬♩♭♪☆∷﹌の★◎▶☺☻►◄▧▨♨◐◑↔↕↘▀▄█▌◦☼♪の☆→♧ぃ£❤▒▬♦◊◦♠♣▣ •❤• ►◄▧▨♨◐◑↔↕▪▫☼♦⊙●○①⊕◎Θ⊙¤㊣★☆♀◆◇◣◢◥▲▼△▽⊿◤◥✐✌✍✡✓✔✕✖♂♀♥♡☜☞☎☏⊙◎☺☻►◄▧▨♨◐◑↔↕♥♡▪▫☼♦▀▄█▌▐░▒▬♦◊◘◙◦☼♠♣▣▤▥▦▩◘◙◈♫♬♪♩♭♪✄☪☣☢☠♯♩♪♫♬♭♮☎☏☪♈ºº₪¤큐«»™♂✿♥ ◕‿-。 。◕‿◕ -------------------------------------------------------------------------------- /packages/vite-html-plugin/src/index.ts: -------------------------------------------------------------------------------- 1 | import fs from 'node:fs' 2 | import path from 'node:path' 3 | import { 4 | type Plugin, 5 | type UserConfig, 6 | type IndexHtmlTransformContext, 7 | normalizePath, 8 | } from 'vite' 9 | // @ts-ignore 10 | import lodashTemplate from 'lodash.template' 11 | import { cleanUrl } from 'vite-plugin-utils/function' 12 | 13 | // Limitations: 14 | // `ejs` `nunjucks` `handlebars` and other tempaltes must be written in the `.html` file. 15 | // Any other file types will be considered static files by Vite. 16 | // see: https://github.com/vitejs/vite/blob/344642ad630d8658308dbf707ed805cb04b49d58/packages/vite/src/node/server/middlewares/static.ts#L77 17 | 18 | export interface Options { 19 | /** Value of script src */ 20 | inject?: string 21 | /** 22 | * e.g. 23 | * 24 | * - 'public/index.html' 25 | * - { 'index.html': 'public/index.html' } 26 | */ 27 | template?: string | { [entryAlias: string]: string } 28 | transformIndexHtml?: (html: string, ctx: IndexHtmlTransformContext) => string | void | { 29 | html?: string 30 | /** Data of lodash.template */ 31 | templateData?: Record 32 | /** 33 | * Options of lodash.template 34 | * @see https://lodash.com/docs/4.17.15#template 35 | */ 36 | templateOptions?: TemplateOptions 37 | } 38 | 39 | /** Finally value of `req.url` or entry of Rollup */ 40 | _path?: string 41 | } 42 | 43 | export type TemplateOptions = { 44 | /** 45 | * @see _.sourceURL 46 | */ 47 | sourceURL?: string | undefined; 48 | /** The "escape" delimiter. */ 49 | escape?: RegExp | undefined; 50 | /** The "evaluate" delimiter. */ 51 | evaluate?: RegExp | undefined; 52 | /** An object to import into the template as local variables. */ 53 | imports?: Record | undefined; 54 | /** The "interpolate" delimiter. */ 55 | interpolate?: RegExp | undefined; 56 | /** Used to reference the data object in the template text. */ 57 | variable?: string | undefined; 58 | } 59 | 60 | export default function viteHtmlPlugin(options: Options | Options[] = {}): Plugin[] { 61 | const opts = mappingTemplate(Array.isArray(options) ? options : [options]) 62 | let root: string; const resolveRoot = (config: UserConfig) => { 63 | // https://github.com/vitejs/vite/blob/cc980b09444f67bdcd07481edf9e0c0de6b9b5bd/packages/vite/src/node/config.ts#L442-L445 64 | root = normalizePath(config.root ? path.resolve(config.root) : process.cwd()) 65 | } 66 | const resolvePath = (template: string, prefer: 'short' | 'long') => { 67 | template = normalizePath(template) 68 | return prefer === 'long' 69 | // Rollup input must be absolute path 70 | ? path.posix.resolve(root, template) 71 | // For support absolute path on Vite serve 72 | : ('/' + template.replace(root, '')) 73 | } 74 | const records: { 75 | source: string; 76 | // Temp entry at build time 77 | entry: string; 78 | }[] = [] 79 | 80 | const plugin: Plugin = { 81 | name: 'vite-html-plugin', 82 | transformIndexHtml: { 83 | enforce: 'pre', 84 | transform(html, ctx) { 85 | const opt = opts.find(opt => opt._path?.endsWith(ctx.path)) || {} as Options 86 | 87 | // Inject js 88 | if (opt.inject) { 89 | // TODO: inject js to anywhere 90 | html = html.replace( 91 | '', 92 | ` \n `, 93 | ) 94 | } 95 | 96 | if (opt.transformIndexHtml) { 97 | const result = opt.transformIndexHtml(html, ctx) 98 | if (typeof result === 'string') { 99 | html = result 100 | } else if (result && typeof result === 'object') { 101 | const { html: _html, templateOptions, templateData } = result 102 | // Maybe ejs template 103 | html = lodashTemplate(_html ?? html, templateOptions)(templateData) 104 | } 105 | } 106 | 107 | return html 108 | } 109 | }, 110 | } 111 | 112 | return [ 113 | { 114 | ...plugin, 115 | apply: 'serve', 116 | config(conf) { 117 | resolveRoot(conf) 118 | }, 119 | configureServer(server) { 120 | server.middlewares.use((req, res, next) => { 121 | let url = req.url ? cleanUrl(req.url) : '' 122 | if (url === '/') { 123 | url = '/index.html' 124 | } 125 | const opt = opts.find(opt => opt.template && opt.template[url.slice(1)]) 126 | if (opt) { 127 | const [, template] = Object.entries(opt.template)[0] 128 | req.url = resolvePath(template, 'short') 129 | 130 | // Useful in `transformIndexHtml` hook 131 | opt._path = req.url 132 | } 133 | 134 | next() 135 | }) 136 | }, 137 | }, 138 | { 139 | ...plugin, 140 | apply: 'build', 141 | config(conf) { 142 | resolveRoot(conf) 143 | 144 | if (!conf.build) conf.build = {} 145 | if (!conf.build.rollupOptions) conf.build.rollupOptions = {} 146 | if (!conf.build.rollupOptions.input) conf.build.rollupOptions.input = {} 147 | 148 | for (const opt of opts) { 149 | const [name, template] = Object.entries(opt.template)[0] 150 | const record = { 151 | source: resolvePath(template, 'long'), 152 | entry: path.posix.join(root, name), 153 | } 154 | records.push(record) 155 | 156 | // Temporarily copy entries to the root dir. 157 | fs.writeFileSync(record.entry, fs.readFileSync(record.source)) 158 | 159 | // Useful in `transformIndexHtml` hook 160 | opt._path = record.entry 161 | } 162 | 163 | let input = conf.build.rollupOptions.input 164 | if (typeof input === 'string' || Array.isArray(input)) { 165 | input = records.map(p => p.entry).concat(input) 166 | } else { 167 | for (const record of records) { 168 | Object.assign(input, { [path.basename(record.entry)]: record.entry }) 169 | } 170 | } 171 | }, 172 | buildEnd() { 173 | for (const entry of records) { 174 | // Remove temporary entries. 175 | fs.rmSync(entry.entry) 176 | } 177 | records.length = 0 178 | }, 179 | } 180 | ] 181 | } 182 | 183 | function mappingTemplate( 184 | options: Options[] 185 | ): (Omit & { 186 | template: { [entryAlias: string]: string } 187 | })[] { 188 | // @ts-ignore 189 | return options.map(opts => { 190 | const { template } = opts 191 | if (typeof template === 'string') { 192 | const lastIndex = template.lastIndexOf('/') 193 | const name = lastIndex > -1 ? template.slice(lastIndex + 1) : template 194 | // Mapping 'public/[name].html' to { '[name].html': 'public/[name].html' } 195 | opts.template = { [name]: template } 196 | } 197 | return opts 198 | }) 199 | } 200 | -------------------------------------------------------------------------------- /packages/vite-plugin-fast-external/presets/element-plus.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @type {import('.').LibMeta} 3 | */ 4 | module.exports = { 5 | name: 'ElementPlus', 6 | members: [ 7 | 'BAR_MAP', 8 | 'CASCADER_PANEL_INJECTION_KEY', 9 | 'CHANGE_EVENT', 10 | 'ClickOutside', 11 | 'CommonPicker', 12 | 'CommonProps', 13 | 'DEFAULT_FORMATS_DATE', 14 | 'DEFAULT_FORMATS_DATEPICKER', 15 | 'DEFAULT_FORMATS_TIME', 16 | 'DROPDOWN_COLLECTION_INJECTION_KEY', 17 | 'DROPDOWN_COLLECTION_ITEM_INJECTION_KEY', 18 | 'DROPDOWN_INJECTION_KEY', 19 | 'DefaultProps', 20 | 'DynamicSizeGrid', 21 | 'DynamicSizeList', 22 | 'EVENT_CODE', 23 | 'Effect', 24 | 'ElAffix', 25 | 'ElAlert', 26 | 'ElAside', 27 | 'ElAutocomplete', 28 | 'ElAvatar', 29 | 'ElBacktop', 30 | 'ElBadge', 31 | 'ElBreadcrumb', 32 | 'ElBreadcrumbItem', 33 | 'ElButton', 34 | 'ElButtonGroup', 35 | 'ElCalendar', 36 | 'ElCard', 37 | 'ElCarousel', 38 | 'ElCarouselItem', 39 | 'ElCascader', 40 | 'ElCascaderPanel', 41 | 'ElCheckTag', 42 | 'ElCheckbox', 43 | 'ElCheckboxButton', 44 | 'ElCheckboxGroup', 45 | 'ElCol', 46 | 'ElCollapse', 47 | 'ElCollapseItem', 48 | 'ElCollapseTransition', 49 | 'ElCollection', 50 | 'ElCollectionItem', 51 | 'ElColorPicker', 52 | 'ElConfigProvider', 53 | 'ElContainer', 54 | 'ElDatePicker', 55 | 'ElDescriptions', 56 | 'ElDescriptionsItem', 57 | 'ElDialog', 58 | 'ElDivider', 59 | 'ElDrawer', 60 | 'ElDropdown', 61 | 'ElDropdownItem', 62 | 'ElDropdownMenu', 63 | 'ElEmpty', 64 | 'ElFooter', 65 | 'ElForm', 66 | 'ElFormItem', 67 | 'ElHeader', 68 | 'ElIcon', 69 | 'ElImage', 70 | 'ElImageViewer', 71 | 'ElInfiniteScroll', 72 | 'ElInput', 73 | 'ElInputNumber', 74 | 'ElLink', 75 | 'ElLoading', 76 | 'ElLoadingDirective', 77 | 'ElLoadingService', 78 | 'ElMain', 79 | 'ElMenu', 80 | 'ElMenuItem', 81 | 'ElMenuItemGroup', 82 | 'ElMessage', 83 | 'ElMessageBox', 84 | 'ElNotification', 85 | 'ElOption', 86 | 'ElOptionGroup', 87 | 'ElOverlay', 88 | 'ElPageHeader', 89 | 'ElPagination', 90 | 'ElPopconfirm', 91 | 'ElPopover', 92 | 'ElPopoverDirective', 93 | 'ElPopper', 94 | 'ElPopperArrow', 95 | 'ElPopperContent', 96 | 'ElPopperTrigger', 97 | 'ElProgress', 98 | 'ElRadio', 99 | 'ElRadioButton', 100 | 'ElRadioGroup', 101 | 'ElRate', 102 | 'ElResult', 103 | 'ElRow', 104 | 'ElScrollbar', 105 | 'ElSelect', 106 | 'ElSelectV2', 107 | 'ElSkeleton', 108 | 'ElSkeletonItem', 109 | 'ElSlider', 110 | 'ElSpace', 111 | 'ElStep', 112 | 'ElSteps', 113 | 'ElSubMenu', 114 | 'ElSwitch', 115 | 'ElTabPane', 116 | 'ElTable', 117 | 'ElTableColumn', 118 | 'ElTabs', 119 | 'ElTag', 120 | 'ElTimePicker', 121 | 'ElTimeSelect', 122 | 'ElTimeline', 123 | 'ElTimelineItem', 124 | 'ElTooltip', 125 | 'ElTransfer', 126 | 'ElTree', 127 | 'ElTreeSelect', 128 | 'ElTreeV2', 129 | 'ElUpload', 130 | 'ExpandTrigger', 131 | 'FIRST_KEYS', 132 | 'FIRST_LAST_KEYS', 133 | 'FORWARD_REF_INJECTION_KEY', 134 | 'FixedSizeGrid', 135 | 'FixedSizeList', 136 | 'ID_INJECTION_KEY', 137 | 'INPUT_EVENT', 138 | 'IconComponentMap', 139 | 'IconMap', 140 | 'LAST_KEYS', 141 | 'Mousewheel', 142 | 'POPPER_CONTAINER_ID', 143 | 'POPPER_CONTAINER_SELECTOR', 144 | 'POPPER_CONTENT_INJECTION_KEY', 145 | 'POPPER_INJECTION_KEY', 146 | 'RepeatClick', 147 | 'Resize', 148 | 'TOOLTIP_INJECTION_KEY', 149 | 'TOOLTIP_V2_OPEN', 150 | 'TimePickPanel', 151 | 'TrapFocus', 152 | 'UPDATE_MODEL_EVENT', 153 | 'WEEK_DAYS', 154 | 'affixEmits', 155 | 'affixProps', 156 | 'alertEffects', 157 | 'alertEmits', 158 | 'alertProps', 159 | 'arrowMiddleware', 160 | 'autocompleteEmits', 161 | 'autocompleteProps', 162 | 'avatarEmits', 163 | 'avatarProps', 164 | 'backtopEmits', 165 | 'backtopProps', 166 | 'badgeProps', 167 | 'breadcrumbItemProps', 168 | 'breadcrumbKey', 169 | 'breadcrumbProps', 170 | 'buildLocaleContext', 171 | 'buildTranslator', 172 | 'buttonEmits', 173 | 'buttonGroupContextKey', 174 | 'buttonNativeTypes', 175 | 'buttonProps', 176 | 'buttonTypes', 177 | 'calendarEmits', 178 | 'calendarProps', 179 | 'cardProps', 180 | 'carouselContextKey', 181 | 'carouselEmits', 182 | 'carouselItemProps', 183 | 'carouselProps', 184 | 'checkTagEmits', 185 | 'checkTagProps', 186 | 'colProps', 187 | 'collapseContextKey', 188 | 'collapseEmits', 189 | 'collapseItemProps', 190 | 'collapseProps', 191 | 'componentSizes', 192 | 'configProviderContextKey', 193 | 'configProviderProps', 194 | 'createModelToggleComposable', 195 | 'datePickTypes', 196 | 'dayjs', 197 | 'default', 198 | 'dialogEmits', 199 | 'dialogInjectionKey', 200 | 'dialogProps', 201 | 'dividerProps', 202 | 'drawerEmits', 203 | 'drawerProps', 204 | 'dropdownItemProps', 205 | 'dropdownMenuProps', 206 | 'dropdownProps', 207 | 'elPaginationKey', 208 | 'emitChangeFn', 209 | 'emptyProps', 210 | 'extractDateFormat', 211 | 'extractTimeFormat', 212 | 'formContextKey', 213 | 'formEmits', 214 | 'formItemContextKey', 215 | 'formItemProps', 216 | 'formItemValidateStates', 217 | 'formProps', 218 | 'genFileId', 219 | 'getPositionDataWithUnit', 220 | 'iconProps', 221 | 'imageEmits', 222 | 'imageProps', 223 | 'imageViewerEmits', 224 | 'imageViewerProps', 225 | 'inputEmits', 226 | 'inputNumberEmits', 227 | 'inputNumberProps', 228 | 'inputProps', 229 | 'install', 230 | 'linkEmits', 231 | 'linkProps', 232 | 'makeInstaller', 233 | 'menuEmits', 234 | 'menuItemEmits', 235 | 'menuItemGroupProps', 236 | 'menuItemProps', 237 | 'menuProps', 238 | 'messageConfig', 239 | 'messageEmits', 240 | 'messageProps', 241 | 'messageTypes', 242 | 'notificationEmits', 243 | 'notificationProps', 244 | 'notificationTypes', 245 | 'overlayEmits', 246 | 'overlayProps', 247 | 'pageHeaderEmits', 248 | 'pageHeaderProps', 249 | 'paginationEmits', 250 | 'paginationProps', 251 | 'popconfirmProps', 252 | 'progressProps', 253 | 'provideGlobalConfig', 254 | 'radioButtonProps', 255 | 'radioEmits', 256 | 'radioGroupEmits', 257 | 'radioGroupKey', 258 | 'radioGroupProps', 259 | 'radioProps', 260 | 'radioPropsBase', 261 | 'rangeArr', 262 | 'rateEmits', 263 | 'rateProps', 264 | 'renderThumbStyle', 265 | 'resultProps', 266 | 'rowContextKey', 267 | 'rowProps', 268 | 'scrollbarContextKey', 269 | 'scrollbarEmits', 270 | 'scrollbarProps', 271 | 'selectGroupKey', 272 | 'selectKey', 273 | 'selectV2InjectionKey', 274 | 'skeletonItemProps', 275 | 'skeletonProps', 276 | 'spaceProps', 277 | 'subMenuProps', 278 | 'switchEmits', 279 | 'switchProps', 280 | 'tabBarProps', 281 | 'tabNavProps', 282 | 'tabPaneProps', 283 | 'tabsEmits', 284 | 'tabsProps', 285 | 'tabsRootContextKey', 286 | 'tagEmits', 287 | 'tagProps', 288 | 'thumbProps', 289 | 'timePickerDefaultProps', 290 | 'timelineItemProps', 291 | 'tooltipV2ContentKey', 292 | 'tooltipV2RootKey', 293 | 'translate', 294 | 'uploadBaseProps', 295 | 'uploadContentProps', 296 | 'uploadContextKey', 297 | 'uploadDraggerEmits', 298 | 'uploadDraggerProps', 299 | 'uploadListEmits', 300 | 'uploadListProps', 301 | 'uploadListTypes', 302 | 'uploadProps', 303 | 'useAttrs', 304 | 'useCascaderConfig', 305 | 'useDelayedRender', 306 | 'useDelayedToggle', 307 | 'useDelayedToggleProps', 308 | 'useDeprecateAppendToBody', 309 | 'useDeprecated', 310 | 'useDialog', 311 | 'useDisabled', 312 | 'useDraggable', 313 | 'useEscapeKeydown', 314 | 'useFloating', 315 | 'useFloatingProps', 316 | 'useFocus', 317 | 'useFormItem', 318 | 'useForwardRef', 319 | 'useForwardRefDirective', 320 | 'useGlobalConfig', 321 | 'useId', 322 | 'useLocale', 323 | 'useLockscreen', 324 | 'useModal', 325 | 'useModelToggle', 326 | 'useModelToggleEmits', 327 | 'useModelToggleProps', 328 | 'useNamespace', 329 | 'usePopperArrowProps', 330 | 'usePopperContainer', 331 | 'usePopperContentProps', 332 | 'usePopperCoreConfigProps', 333 | 'usePopperProps', 334 | 'usePopperTriggerProps', 335 | 'usePreventGlobal', 336 | 'useProp', 337 | 'useRadio', 338 | 'useRestoreActive', 339 | 'useSameTarget', 340 | 'useSize', 341 | 'useSizeProp', 342 | 'useSpace', 343 | 'useTeleport', 344 | 'useThrottleRender', 345 | 'useTimeout', 346 | 'useTooltipContentProps', 347 | 'useTooltipProps', 348 | 'useTooltipTriggerProps', 349 | 'useTransitionFallthrough', 350 | 'useTransitionFallthroughEmits', 351 | 'useZIndex', 352 | 'vLoading', 353 | 'version', 354 | 'virtualizedGridProps', 355 | 'virtualizedListProps', 356 | 'virtualizedProps', 357 | 'virtualizedScrollbarProps', 358 | ], 359 | }; -------------------------------------------------------------------------------- /packages/vite-plugin-fast-external/presets/ant-design-vue-v3.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @type {import('.').LibMeta} 3 | */ 4 | module.exports = { 5 | name: 'antd', 6 | members: [ 7 | 'BAR_MAP', 8 | 'CASCADER_PANEL_INJECTION_KEY', 9 | 'CHANGE_EVENT', 10 | 'ClickOutside', 11 | 'CommonPicker', 12 | 'CommonProps', 13 | 'DEFAULT_FORMATS_DATE', 14 | 'DEFAULT_FORMATS_DATEPICKER', 15 | 'DEFAULT_FORMATS_TIME', 16 | 'DROPDOWN_COLLECTION_INJECTION_KEY', 17 | 'DROPDOWN_COLLECTION_ITEM_INJECTION_KEY', 18 | 'DROPDOWN_INJECTION_KEY', 19 | 'DefaultProps', 20 | 'DynamicSizeGrid', 21 | 'DynamicSizeList', 22 | 'EVENT_CODE', 23 | 'Effect', 24 | 'ElAffix', 25 | 'ElAlert', 26 | 'ElAside', 27 | 'ElAutocomplete', 28 | 'ElAvatar', 29 | 'ElBacktop', 30 | 'ElBadge', 31 | 'ElBreadcrumb', 32 | 'ElBreadcrumbItem', 33 | 'ElButton', 34 | 'ElButtonGroup', 35 | 'ElCalendar', 36 | 'ElCard', 37 | 'ElCarousel', 38 | 'ElCarouselItem', 39 | 'ElCascader', 40 | 'ElCascaderPanel', 41 | 'ElCheckTag', 42 | 'ElCheckbox', 43 | 'ElCheckboxButton', 44 | 'ElCheckboxGroup', 45 | 'ElCol', 46 | 'ElCollapse', 47 | 'ElCollapseItem', 48 | 'ElCollapseTransition', 49 | 'ElCollection', 50 | 'ElCollectionItem', 51 | 'ElColorPicker', 52 | 'ElConfigProvider', 53 | 'ElContainer', 54 | 'ElDatePicker', 55 | 'ElDescriptions', 56 | 'ElDescriptionsItem', 57 | 'ElDialog', 58 | 'ElDivider', 59 | 'ElDrawer', 60 | 'ElDropdown', 61 | 'ElDropdownItem', 62 | 'ElDropdownMenu', 63 | 'ElEmpty', 64 | 'ElFooter', 65 | 'ElForm', 66 | 'ElFormItem', 67 | 'ElHeader', 68 | 'ElIcon', 69 | 'ElImage', 70 | 'ElImageViewer', 71 | 'ElInfiniteScroll', 72 | 'ElInput', 73 | 'ElInputNumber', 74 | 'ElLink', 75 | 'ElLoading', 76 | 'ElLoadingDirective', 77 | 'ElLoadingService', 78 | 'ElMain', 79 | 'ElMenu', 80 | 'ElMenuItem', 81 | 'ElMenuItemGroup', 82 | 'ElMessage', 83 | 'ElMessageBox', 84 | 'ElNotification', 85 | 'ElOption', 86 | 'ElOptionGroup', 87 | 'ElOverlay', 88 | 'ElPageHeader', 89 | 'ElPagination', 90 | 'ElPopconfirm', 91 | 'ElPopover', 92 | 'ElPopoverDirective', 93 | 'ElPopper', 94 | 'ElPopperArrow', 95 | 'ElPopperContent', 96 | 'ElPopperTrigger', 97 | 'ElProgress', 98 | 'ElRadio', 99 | 'ElRadioButton', 100 | 'ElRadioGroup', 101 | 'ElRate', 102 | 'ElResult', 103 | 'ElRow', 104 | 'ElScrollbar', 105 | 'ElSelect', 106 | 'ElSelectV2', 107 | 'ElSkeleton', 108 | 'ElSkeletonItem', 109 | 'ElSlider', 110 | 'ElSpace', 111 | 'ElStep', 112 | 'ElSteps', 113 | 'ElSubMenu', 114 | 'ElSwitch', 115 | 'ElTabPane', 116 | 'ElTable', 117 | 'ElTableColumn', 118 | 'ElTabs', 119 | 'ElTag', 120 | 'ElTimePicker', 121 | 'ElTimeSelect', 122 | 'ElTimeline', 123 | 'ElTimelineItem', 124 | 'ElTooltip', 125 | 'ElTransfer', 126 | 'ElTree', 127 | 'ElTreeSelect', 128 | 'ElTreeV2', 129 | 'ElUpload', 130 | 'ExpandTrigger', 131 | 'FIRST_KEYS', 132 | 'FIRST_LAST_KEYS', 133 | 'FORWARD_REF_INJECTION_KEY', 134 | 'FixedSizeGrid', 135 | 'FixedSizeList', 136 | 'ID_INJECTION_KEY', 137 | 'INPUT_EVENT', 138 | 'IconComponentMap', 139 | 'IconMap', 140 | 'LAST_KEYS', 141 | 'Mousewheel', 142 | 'POPPER_CONTAINER_ID', 143 | 'POPPER_CONTAINER_SELECTOR', 144 | 'POPPER_CONTENT_INJECTION_KEY', 145 | 'POPPER_INJECTION_KEY', 146 | 'RepeatClick', 147 | 'Resize', 148 | 'TOOLTIP_INJECTION_KEY', 149 | 'TOOLTIP_V2_OPEN', 150 | 'TimePickPanel', 151 | 'TrapFocus', 152 | 'UPDATE_MODEL_EVENT', 153 | 'WEEK_DAYS', 154 | 'affixEmits', 155 | 'affixProps', 156 | 'alertEffects', 157 | 'alertEmits', 158 | 'alertProps', 159 | 'arrowMiddleware', 160 | 'autocompleteEmits', 161 | 'autocompleteProps', 162 | 'avatarEmits', 163 | 'avatarProps', 164 | 'backtopEmits', 165 | 'backtopProps', 166 | 'badgeProps', 167 | 'breadcrumbItemProps', 168 | 'breadcrumbKey', 169 | 'breadcrumbProps', 170 | 'buildLocaleContext', 171 | 'buildTranslator', 172 | 'buttonEmits', 173 | 'buttonGroupContextKey', 174 | 'buttonNativeTypes', 175 | 'buttonProps', 176 | 'buttonTypes', 177 | 'calendarEmits', 178 | 'calendarProps', 179 | 'cardProps', 180 | 'carouselContextKey', 181 | 'carouselEmits', 182 | 'carouselItemProps', 183 | 'carouselProps', 184 | 'checkTagEmits', 185 | 'checkTagProps', 186 | 'colProps', 187 | 'collapseContextKey', 188 | 'collapseEmits', 189 | 'collapseItemProps', 190 | 'collapseProps', 191 | 'componentSizeMap', 192 | 'componentSizes', 193 | 'configProviderContextKey', 194 | 'configProviderProps', 195 | 'createModelToggleComposable', 196 | 'datePickTypes', 197 | 'dayjs', 198 | 'default', 199 | 'dialogEmits', 200 | 'dialogInjectionKey', 201 | 'dialogProps', 202 | 'dividerProps', 203 | 'drawerEmits', 204 | 'drawerProps', 205 | 'dropdownItemProps', 206 | 'dropdownMenuProps', 207 | 'dropdownProps', 208 | 'elPaginationKey', 209 | 'emitChangeFn', 210 | 'emptyProps', 211 | 'extractDateFormat', 212 | 'extractTimeFormat', 213 | 'formContextKey', 214 | 'formEmits', 215 | 'formItemContextKey', 216 | 'formItemProps', 217 | 'formItemValidateStates', 218 | 'formProps', 219 | 'genFileId', 220 | 'getComponentSize', 221 | 'getPositionDataWithUnit', 222 | 'iconProps', 223 | 'imageEmits', 224 | 'imageProps', 225 | 'imageViewerEmits', 226 | 'imageViewerProps', 227 | 'inputEmits', 228 | 'inputNumberEmits', 229 | 'inputNumberProps', 230 | 'inputProps', 231 | 'install', 232 | 'linkEmits', 233 | 'linkProps', 234 | 'makeInstaller', 235 | 'menuEmits', 236 | 'menuItemEmits', 237 | 'menuItemGroupProps', 238 | 'menuItemProps', 239 | 'menuProps', 240 | 'messageConfig', 241 | 'messageEmits', 242 | 'messageProps', 243 | 'messageTypes', 244 | 'notificationEmits', 245 | 'notificationProps', 246 | 'notificationTypes', 247 | 'overlayEmits', 248 | 'overlayProps', 249 | 'pageHeaderEmits', 250 | 'pageHeaderProps', 251 | 'paginationEmits', 252 | 'paginationProps', 253 | 'popconfirmProps', 254 | 'progressProps', 255 | 'provideGlobalConfig', 256 | 'radioButtonProps', 257 | 'radioEmits', 258 | 'radioGroupEmits', 259 | 'radioGroupKey', 260 | 'radioGroupProps', 261 | 'radioProps', 262 | 'radioPropsBase', 263 | 'rangeArr', 264 | 'rateEmits', 265 | 'rateProps', 266 | 'renderThumbStyle', 267 | 'resultProps', 268 | 'rowContextKey', 269 | 'rowProps', 270 | 'scrollbarContextKey', 271 | 'scrollbarEmits', 272 | 'scrollbarProps', 273 | 'selectGroupKey', 274 | 'selectKey', 275 | 'selectV2InjectionKey', 276 | 'skeletonItemProps', 277 | 'skeletonProps', 278 | 'spaceProps', 279 | 'subMenuProps', 280 | 'switchEmits', 281 | 'switchProps', 282 | 'tabBarProps', 283 | 'tabNavProps', 284 | 'tabPaneProps', 285 | 'tabsEmits', 286 | 'tabsProps', 287 | 'tabsRootContextKey', 288 | 'tagEmits', 289 | 'tagProps', 290 | 'thumbProps', 291 | 'timePickerDefaultProps', 292 | 'timelineItemProps', 293 | 'tooltipV2ContentKey', 294 | 'tooltipV2RootKey', 295 | 'translate', 296 | 'uploadBaseProps', 297 | 'uploadContentProps', 298 | 'uploadContextKey', 299 | 'uploadDraggerEmits', 300 | 'uploadDraggerProps', 301 | 'uploadListEmits', 302 | 'uploadListProps', 303 | 'uploadListTypes', 304 | 'uploadProps', 305 | 'useAttrs', 306 | 'useCascaderConfig', 307 | 'useDelayedRender', 308 | 'useDelayedToggle', 309 | 'useDelayedToggleProps', 310 | 'useDeprecateAppendToBody', 311 | 'useDeprecated', 312 | 'useDialog', 313 | 'useDisabled', 314 | 'useDraggable', 315 | 'useEscapeKeydown', 316 | 'useFloating', 317 | 'useFloatingProps', 318 | 'useFocus', 319 | 'useFormItem', 320 | 'useForwardRef', 321 | 'useForwardRefDirective', 322 | 'useGlobalConfig', 323 | 'useId', 324 | 'useLocale', 325 | 'useLockscreen', 326 | 'useModal', 327 | 'useModelToggle', 328 | 'useModelToggleEmits', 329 | 'useModelToggleProps', 330 | 'useNamespace', 331 | 'usePopperArrowProps', 332 | 'usePopperContainer', 333 | 'usePopperContentProps', 334 | 'usePopperCoreConfigProps', 335 | 'usePopperProps', 336 | 'usePopperTriggerProps', 337 | 'usePreventGlobal', 338 | 'useProp', 339 | 'useRadio', 340 | 'useRestoreActive', 341 | 'useSameTarget', 342 | 'useSize', 343 | 'useSizeProp', 344 | 'useSpace', 345 | 'useTeleport', 346 | 'useThrottleRender', 347 | 'useTimeout', 348 | 'useTooltipContentProps', 349 | 'useTooltipProps', 350 | 'useTooltipTriggerProps', 351 | 'useTransitionFallthrough', 352 | 'useTransitionFallthroughEmits', 353 | 'useZIndex', 354 | 'vLoading', 355 | 'version', 356 | 'virtualizedGridProps', 357 | 'virtualizedListProps', 358 | 'virtualizedProps', 359 | 'virtualizedScrollbarProps', 360 | ], 361 | }; -------------------------------------------------------------------------------- /pnpm-lock.yaml: -------------------------------------------------------------------------------- 1 | lockfileVersion: 5.4 2 | 3 | importers: 4 | 5 | .: 6 | specifiers: 7 | '@types/node': ^18.0.6 8 | typescript: ^4.7.4 9 | devDependencies: 10 | '@types/node': 18.0.6 11 | typescript: 4.7.4 12 | 13 | packages/create-viters: 14 | specifiers: {} 15 | 16 | packages/vite-html-plugin: 17 | specifiers: 18 | lodash.template: ^4.5.0 19 | vite: ^3.x.x 20 | vite-plugin-utils: ^0.3.5 21 | devDependencies: 22 | lodash.template: 4.5.0 23 | vite: 3.0.2 24 | vite-plugin-utils: 0.3.5 25 | 26 | packages/vite-plugin-angular: 27 | specifiers: {} 28 | 29 | packages/vite-plugin-fast-external: 30 | specifiers: 31 | vite: ^3.x.x 32 | devDependencies: 33 | vite: 3.0.2 34 | 35 | packages/vite-plugin-utils: 36 | specifiers: 37 | acorn-walk: ^8.2.0 38 | fast-glob: ^3.2.11 39 | vite: ^3.x.x 40 | dependencies: 41 | acorn-walk: 8.2.0 42 | fast-glob: 3.2.11 43 | devDependencies: 44 | vite: 3.0.2 45 | 46 | packages/vite-utils: 47 | specifiers: {} 48 | 49 | packages/viters: 50 | specifiers: {} 51 | 52 | playground/vite-html-plugin: 53 | specifiers: 54 | vite: ^3.x.x 55 | vite-html-plugin: workspace:* 56 | devDependencies: 57 | vite: 3.0.2 58 | vite-html-plugin: link:../../packages/vite-html-plugin 59 | 60 | playground/vite-plugin-fast-external: 61 | specifiers: 62 | vite: ^3.x.x 63 | devDependencies: 64 | vite: 3.0.2 65 | 66 | packages: 67 | 68 | /@nodelib/fs.scandir/2.1.5: 69 | resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} 70 | engines: {node: '>= 8'} 71 | dependencies: 72 | '@nodelib/fs.stat': 2.0.5 73 | run-parallel: 1.2.0 74 | dev: false 75 | 76 | /@nodelib/fs.stat/2.0.5: 77 | resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} 78 | engines: {node: '>= 8'} 79 | dev: false 80 | 81 | /@nodelib/fs.walk/1.2.8: 82 | resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} 83 | engines: {node: '>= 8'} 84 | dependencies: 85 | '@nodelib/fs.scandir': 2.1.5 86 | fastq: 1.13.0 87 | dev: false 88 | 89 | /@types/node/18.0.6: 90 | resolution: {integrity: sha512-/xUq6H2aQm261exT6iZTMifUySEt4GR5KX8eYyY+C4MSNPqSh9oNIP7tz2GLKTlFaiBbgZNxffoR3CVRG+cljw==} 91 | dev: true 92 | 93 | /acorn-walk/8.2.0: 94 | resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} 95 | engines: {node: '>=0.4.0'} 96 | dev: false 97 | 98 | /braces/3.0.2: 99 | resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} 100 | engines: {node: '>=8'} 101 | dependencies: 102 | fill-range: 7.0.1 103 | dev: false 104 | 105 | /esbuild-android-64/0.14.49: 106 | resolution: {integrity: sha512-vYsdOTD+yi+kquhBiFWl3tyxnj2qZJsl4tAqwhT90ktUdnyTizgle7TjNx6Ar1bN7wcwWqZ9QInfdk2WVagSww==} 107 | engines: {node: '>=12'} 108 | cpu: [x64] 109 | os: [android] 110 | requiresBuild: true 111 | dev: true 112 | optional: true 113 | 114 | /esbuild-android-arm64/0.14.49: 115 | resolution: {integrity: sha512-g2HGr/hjOXCgSsvQZ1nK4nW/ei8JUx04Li74qub9qWrStlysaVmadRyTVuW32FGIpLQyc5sUjjZopj49eGGM2g==} 116 | engines: {node: '>=12'} 117 | cpu: [arm64] 118 | os: [android] 119 | requiresBuild: true 120 | dev: true 121 | optional: true 122 | 123 | /esbuild-darwin-64/0.14.49: 124 | resolution: {integrity: sha512-3rvqnBCtX9ywso5fCHixt2GBCUsogNp9DjGmvbBohh31Ces34BVzFltMSxJpacNki96+WIcX5s/vum+ckXiLYg==} 125 | engines: {node: '>=12'} 126 | cpu: [x64] 127 | os: [darwin] 128 | requiresBuild: true 129 | dev: true 130 | optional: true 131 | 132 | /esbuild-darwin-arm64/0.14.49: 133 | resolution: {integrity: sha512-XMaqDxO846srnGlUSJnwbijV29MTKUATmOLyQSfswbK/2X5Uv28M9tTLUJcKKxzoo9lnkYPsx2o8EJcTYwCs/A==} 134 | engines: {node: '>=12'} 135 | cpu: [arm64] 136 | os: [darwin] 137 | requiresBuild: true 138 | dev: true 139 | optional: true 140 | 141 | /esbuild-freebsd-64/0.14.49: 142 | resolution: {integrity: sha512-NJ5Q6AjV879mOHFri+5lZLTp5XsO2hQ+KSJYLbfY9DgCu8s6/Zl2prWXVANYTeCDLlrIlNNYw8y34xqyLDKOmQ==} 143 | engines: {node: '>=12'} 144 | cpu: [x64] 145 | os: [freebsd] 146 | requiresBuild: true 147 | dev: true 148 | optional: true 149 | 150 | /esbuild-freebsd-arm64/0.14.49: 151 | resolution: {integrity: sha512-lFLtgXnAc3eXYqj5koPlBZvEbBSOSUbWO3gyY/0+4lBdRqELyz4bAuamHvmvHW5swJYL7kngzIZw6kdu25KGOA==} 152 | engines: {node: '>=12'} 153 | cpu: [arm64] 154 | os: [freebsd] 155 | requiresBuild: true 156 | dev: true 157 | optional: true 158 | 159 | /esbuild-linux-32/0.14.49: 160 | resolution: {integrity: sha512-zTTH4gr2Kb8u4QcOpTDVn7Z8q7QEIvFl/+vHrI3cF6XOJS7iEI1FWslTo3uofB2+mn6sIJEQD9PrNZKoAAMDiA==} 161 | engines: {node: '>=12'} 162 | cpu: [ia32] 163 | os: [linux] 164 | requiresBuild: true 165 | dev: true 166 | optional: true 167 | 168 | /esbuild-linux-64/0.14.49: 169 | resolution: {integrity: sha512-hYmzRIDzFfLrB5c1SknkxzM8LdEUOusp6M2TnuQZJLRtxTgyPnZZVtyMeCLki0wKgYPXkFsAVhi8vzo2mBNeTg==} 170 | engines: {node: '>=12'} 171 | cpu: [x64] 172 | os: [linux] 173 | requiresBuild: true 174 | dev: true 175 | optional: true 176 | 177 | /esbuild-linux-arm/0.14.49: 178 | resolution: {integrity: sha512-iE3e+ZVv1Qz1Sy0gifIsarJMQ89Rpm9mtLSRtG3AH0FPgAzQ5Z5oU6vYzhc/3gSPi2UxdCOfRhw2onXuFw/0lg==} 179 | engines: {node: '>=12'} 180 | cpu: [arm] 181 | os: [linux] 182 | requiresBuild: true 183 | dev: true 184 | optional: true 185 | 186 | /esbuild-linux-arm64/0.14.49: 187 | resolution: {integrity: sha512-KLQ+WpeuY+7bxukxLz5VgkAAVQxUv67Ft4DmHIPIW+2w3ObBPQhqNoeQUHxopoW/aiOn3m99NSmSV+bs4BSsdA==} 188 | engines: {node: '>=12'} 189 | cpu: [arm64] 190 | os: [linux] 191 | requiresBuild: true 192 | dev: true 193 | optional: true 194 | 195 | /esbuild-linux-mips64le/0.14.49: 196 | resolution: {integrity: sha512-n+rGODfm8RSum5pFIqFQVQpYBw+AztL8s6o9kfx7tjfK0yIGF6tm5HlG6aRjodiiKkH2xAiIM+U4xtQVZYU4rA==} 197 | engines: {node: '>=12'} 198 | cpu: [mips64el] 199 | os: [linux] 200 | requiresBuild: true 201 | dev: true 202 | optional: true 203 | 204 | /esbuild-linux-ppc64le/0.14.49: 205 | resolution: {integrity: sha512-WP9zR4HX6iCBmMFH+XHHng2LmdoIeUmBpL4aL2TR8ruzXyT4dWrJ5BSbT8iNo6THN8lod6GOmYDLq/dgZLalGw==} 206 | engines: {node: '>=12'} 207 | cpu: [ppc64] 208 | os: [linux] 209 | requiresBuild: true 210 | dev: true 211 | optional: true 212 | 213 | /esbuild-linux-riscv64/0.14.49: 214 | resolution: {integrity: sha512-h66ORBz+Dg+1KgLvzTVQEA1LX4XBd1SK0Fgbhhw4akpG/YkN8pS6OzYI/7SGENiN6ao5hETRDSkVcvU9NRtkMQ==} 215 | engines: {node: '>=12'} 216 | cpu: [riscv64] 217 | os: [linux] 218 | requiresBuild: true 219 | dev: true 220 | optional: true 221 | 222 | /esbuild-linux-s390x/0.14.49: 223 | resolution: {integrity: sha512-DhrUoFVWD+XmKO1y7e4kNCqQHPs6twz6VV6Uezl/XHYGzM60rBewBF5jlZjG0nCk5W/Xy6y1xWeopkrhFFM0sQ==} 224 | engines: {node: '>=12'} 225 | cpu: [s390x] 226 | os: [linux] 227 | requiresBuild: true 228 | dev: true 229 | optional: true 230 | 231 | /esbuild-netbsd-64/0.14.49: 232 | resolution: {integrity: sha512-BXaUwFOfCy2T+hABtiPUIpWjAeWK9P8O41gR4Pg73hpzoygVGnj0nI3YK4SJhe52ELgtdgWP/ckIkbn2XaTxjQ==} 233 | engines: {node: '>=12'} 234 | cpu: [x64] 235 | os: [netbsd] 236 | requiresBuild: true 237 | dev: true 238 | optional: true 239 | 240 | /esbuild-openbsd-64/0.14.49: 241 | resolution: {integrity: sha512-lP06UQeLDGmVPw9Rg437Btu6J9/BmyhdoefnQ4gDEJTtJvKtQaUcOQrhjTq455ouZN4EHFH1h28WOJVANK41kA==} 242 | engines: {node: '>=12'} 243 | cpu: [x64] 244 | os: [openbsd] 245 | requiresBuild: true 246 | dev: true 247 | optional: true 248 | 249 | /esbuild-sunos-64/0.14.49: 250 | resolution: {integrity: sha512-4c8Zowp+V3zIWje329BeLbGh6XI9c/rqARNaj5yPHdC61pHI9UNdDxT3rePPJeWcEZVKjkiAS6AP6kiITp7FSw==} 251 | engines: {node: '>=12'} 252 | cpu: [x64] 253 | os: [sunos] 254 | requiresBuild: true 255 | dev: true 256 | optional: true 257 | 258 | /esbuild-windows-32/0.14.49: 259 | resolution: {integrity: sha512-q7Rb+J9yHTeKr9QTPDYkqfkEj8/kcKz9lOabDuvEXpXuIcosWCJgo5Z7h/L4r7rbtTH4a8U2FGKb6s1eeOHmJA==} 260 | engines: {node: '>=12'} 261 | cpu: [ia32] 262 | os: [win32] 263 | requiresBuild: true 264 | dev: true 265 | optional: true 266 | 267 | /esbuild-windows-64/0.14.49: 268 | resolution: {integrity: sha512-+Cme7Ongv0UIUTniPqfTX6mJ8Deo7VXw9xN0yJEN1lQMHDppTNmKwAM3oGbD/Vqff+07K2gN0WfNkMohmG+dVw==} 269 | engines: {node: '>=12'} 270 | cpu: [x64] 271 | os: [win32] 272 | requiresBuild: true 273 | dev: true 274 | optional: true 275 | 276 | /esbuild-windows-arm64/0.14.49: 277 | resolution: {integrity: sha512-v+HYNAXzuANrCbbLFJ5nmO3m5y2PGZWLe3uloAkLt87aXiO2mZr3BTmacZdjwNkNEHuH3bNtN8cak+mzVjVPfA==} 278 | engines: {node: '>=12'} 279 | cpu: [arm64] 280 | os: [win32] 281 | requiresBuild: true 282 | dev: true 283 | optional: true 284 | 285 | /esbuild/0.14.49: 286 | resolution: {integrity: sha512-/TlVHhOaq7Yz8N1OJrjqM3Auzo5wjvHFLk+T8pIue+fhnhIMpfAzsG6PLVMbFveVxqD2WOp3QHei+52IMUNmCw==} 287 | engines: {node: '>=12'} 288 | hasBin: true 289 | requiresBuild: true 290 | optionalDependencies: 291 | esbuild-android-64: 0.14.49 292 | esbuild-android-arm64: 0.14.49 293 | esbuild-darwin-64: 0.14.49 294 | esbuild-darwin-arm64: 0.14.49 295 | esbuild-freebsd-64: 0.14.49 296 | esbuild-freebsd-arm64: 0.14.49 297 | esbuild-linux-32: 0.14.49 298 | esbuild-linux-64: 0.14.49 299 | esbuild-linux-arm: 0.14.49 300 | esbuild-linux-arm64: 0.14.49 301 | esbuild-linux-mips64le: 0.14.49 302 | esbuild-linux-ppc64le: 0.14.49 303 | esbuild-linux-riscv64: 0.14.49 304 | esbuild-linux-s390x: 0.14.49 305 | esbuild-netbsd-64: 0.14.49 306 | esbuild-openbsd-64: 0.14.49 307 | esbuild-sunos-64: 0.14.49 308 | esbuild-windows-32: 0.14.49 309 | esbuild-windows-64: 0.14.49 310 | esbuild-windows-arm64: 0.14.49 311 | dev: true 312 | 313 | /fast-glob/3.2.11: 314 | resolution: {integrity: sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==} 315 | engines: {node: '>=8.6.0'} 316 | dependencies: 317 | '@nodelib/fs.stat': 2.0.5 318 | '@nodelib/fs.walk': 1.2.8 319 | glob-parent: 5.1.2 320 | merge2: 1.4.1 321 | micromatch: 4.0.5 322 | dev: false 323 | 324 | /fastq/1.13.0: 325 | resolution: {integrity: sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==} 326 | dependencies: 327 | reusify: 1.0.4 328 | dev: false 329 | 330 | /fill-range/7.0.1: 331 | resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} 332 | engines: {node: '>=8'} 333 | dependencies: 334 | to-regex-range: 5.0.1 335 | dev: false 336 | 337 | /fsevents/2.3.2: 338 | resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} 339 | engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} 340 | os: [darwin] 341 | requiresBuild: true 342 | dev: true 343 | optional: true 344 | 345 | /function-bind/1.1.1: 346 | resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} 347 | dev: true 348 | 349 | /glob-parent/5.1.2: 350 | resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} 351 | engines: {node: '>= 6'} 352 | dependencies: 353 | is-glob: 4.0.3 354 | dev: false 355 | 356 | /has/1.0.3: 357 | resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} 358 | engines: {node: '>= 0.4.0'} 359 | dependencies: 360 | function-bind: 1.1.1 361 | dev: true 362 | 363 | /is-core-module/2.9.0: 364 | resolution: {integrity: sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==} 365 | dependencies: 366 | has: 1.0.3 367 | dev: true 368 | 369 | /is-extglob/2.1.1: 370 | resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} 371 | engines: {node: '>=0.10.0'} 372 | dev: false 373 | 374 | /is-glob/4.0.3: 375 | resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} 376 | engines: {node: '>=0.10.0'} 377 | dependencies: 378 | is-extglob: 2.1.1 379 | dev: false 380 | 381 | /is-number/7.0.0: 382 | resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} 383 | engines: {node: '>=0.12.0'} 384 | dev: false 385 | 386 | /lodash._reinterpolate/3.0.0: 387 | resolution: {integrity: sha512-xYHt68QRoYGjeeM/XOE1uJtvXQAgvszfBhjV4yvsQH0u2i9I6cI6c6/eG4Hh3UAOVn0y/xAXwmTzEay49Q//HA==} 388 | dev: true 389 | 390 | /lodash.template/4.5.0: 391 | resolution: {integrity: sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==} 392 | dependencies: 393 | lodash._reinterpolate: 3.0.0 394 | lodash.templatesettings: 4.2.0 395 | dev: true 396 | 397 | /lodash.templatesettings/4.2.0: 398 | resolution: {integrity: sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ==} 399 | dependencies: 400 | lodash._reinterpolate: 3.0.0 401 | dev: true 402 | 403 | /merge2/1.4.1: 404 | resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} 405 | engines: {node: '>= 8'} 406 | dev: false 407 | 408 | /micromatch/4.0.5: 409 | resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} 410 | engines: {node: '>=8.6'} 411 | dependencies: 412 | braces: 3.0.2 413 | picomatch: 2.3.1 414 | dev: false 415 | 416 | /nanoid/3.3.4: 417 | resolution: {integrity: sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==} 418 | engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} 419 | hasBin: true 420 | dev: true 421 | 422 | /path-parse/1.0.7: 423 | resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} 424 | dev: true 425 | 426 | /picocolors/1.0.0: 427 | resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} 428 | dev: true 429 | 430 | /picomatch/2.3.1: 431 | resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} 432 | engines: {node: '>=8.6'} 433 | dev: false 434 | 435 | /postcss/8.4.14: 436 | resolution: {integrity: sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==} 437 | engines: {node: ^10 || ^12 || >=14} 438 | dependencies: 439 | nanoid: 3.3.4 440 | picocolors: 1.0.0 441 | source-map-js: 1.0.2 442 | dev: true 443 | 444 | /queue-microtask/1.2.3: 445 | resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} 446 | dev: false 447 | 448 | /resolve/1.22.1: 449 | resolution: {integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==} 450 | hasBin: true 451 | dependencies: 452 | is-core-module: 2.9.0 453 | path-parse: 1.0.7 454 | supports-preserve-symlinks-flag: 1.0.0 455 | dev: true 456 | 457 | /reusify/1.0.4: 458 | resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} 459 | engines: {iojs: '>=1.0.0', node: '>=0.10.0'} 460 | dev: false 461 | 462 | /rollup/2.77.0: 463 | resolution: {integrity: sha512-vL8xjY4yOQEw79DvyXLijhnhh+R/O9zpF/LEgkCebZFtb6ELeN9H3/2T0r8+mp+fFTBHZ5qGpOpW2ela2zRt3g==} 464 | engines: {node: '>=10.0.0'} 465 | hasBin: true 466 | optionalDependencies: 467 | fsevents: 2.3.2 468 | dev: true 469 | 470 | /run-parallel/1.2.0: 471 | resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} 472 | dependencies: 473 | queue-microtask: 1.2.3 474 | dev: false 475 | 476 | /source-map-js/1.0.2: 477 | resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} 478 | engines: {node: '>=0.10.0'} 479 | dev: true 480 | 481 | /supports-preserve-symlinks-flag/1.0.0: 482 | resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} 483 | engines: {node: '>= 0.4'} 484 | dev: true 485 | 486 | /to-regex-range/5.0.1: 487 | resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} 488 | engines: {node: '>=8.0'} 489 | dependencies: 490 | is-number: 7.0.0 491 | dev: false 492 | 493 | /typescript/4.7.4: 494 | resolution: {integrity: sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==} 495 | engines: {node: '>=4.2.0'} 496 | hasBin: true 497 | dev: true 498 | 499 | /vite-plugin-utils/0.3.5: 500 | resolution: {integrity: sha512-bQI9MkJNmG7ZLhI4eDOcb3JSks/ytbpW/rW5hpeo1kPhNhVAi3UHbgtZIVlvp2leW8H3sC8AEUwN2nWek67qZA==} 501 | dev: true 502 | 503 | /vite/3.0.2: 504 | resolution: {integrity: sha512-TAqydxW/w0U5AoL5AsD9DApTvGb2iNbGs3sN4u2VdT1GFkQVUfgUldt+t08TZgi23uIauh1TUOQJALduo9GXqw==} 505 | engines: {node: ^14.18.0 || >=16.0.0} 506 | hasBin: true 507 | peerDependencies: 508 | less: '*' 509 | sass: '*' 510 | stylus: '*' 511 | terser: ^5.4.0 512 | peerDependenciesMeta: 513 | less: 514 | optional: true 515 | sass: 516 | optional: true 517 | stylus: 518 | optional: true 519 | terser: 520 | optional: true 521 | dependencies: 522 | esbuild: 0.14.49 523 | postcss: 8.4.14 524 | resolve: 1.22.1 525 | rollup: 2.77.0 526 | optionalDependencies: 527 | fsevents: 2.3.2 528 | dev: true 529 | --------------------------------------------------------------------------------