├── .gitignore ├── .npmignore ├── .vscode └── settings.json ├── LICENSE ├── README.md ├── package.json ├── pnpm-lock.yaml ├── src └── index.ts ├── test ├── entry.ts ├── test.json └── vite.config.ts ├── tsconfig.json └── vite.config.ts /.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | .DS_Store 3 | dist 4 | node_modules 5 | package.tgz 6 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidmyersdev/vite-plugin-externalize-deps/057c695f1e63fe66560efe89d85915fbfbfce86d/.npmignore -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "typescript.tsdk": "node_modules/typescript/lib" 3 | } 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 David R. Myers 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vite-plugin-externalize-deps 2 | 3 | A configurable Vite plugin to help externalize your dependencies (including [subpaths](https://nodejs.org/api/packages.html#subpath-patterns)). 4 | 5 | ## Getting Started 6 | 7 | Install the package as a dev dependency. 8 | 9 | ```sh 10 | # npm 11 | npm install --save-dev vite-plugin-externalize-deps 12 | 13 | # pnpm 14 | pnpm install --save-dev vite-plugin-externalize-deps 15 | 16 | # yarn 17 | yarn add --dev vite-plugin-externalize-deps 18 | ``` 19 | 20 | Add the plugin to your `vite.config.ts` file. 21 | 22 | ```ts 23 | import { defineConfig } from 'vite' 24 | import { externalizeDeps } from 'vite-plugin-externalize-deps' 25 | 26 | // https://vitejs.dev/config/ 27 | export default defineConfig({ 28 | plugins: [ 29 | externalizeDeps(), 30 | ], 31 | }) 32 | ``` 33 | 34 | ### Configuration 35 | 36 | Pass an object to `externalizeDeps` to override the default configuration. 37 | 38 | ```ts 39 | // These are the default values. 40 | externalizeDeps({ 41 | deps: true, 42 | devDeps: false, 43 | except: [], 44 | nodeBuiltins: true, 45 | optionalDeps: true, 46 | peerDeps: true, 47 | useFile: join(process.cwd(), 'package.json'), 48 | }) 49 | ``` 50 | 51 | To _include_ specific dependencies in your bundle, you can add exceptions with the `except` option. 52 | 53 | ```ts 54 | externalizeDeps({ 55 | except: [ 56 | // Match exact values with strings. 57 | '@some/obscure/dependency', 58 | // Or match patterns with regular expressions. 59 | /^@some\/obscure(?:\/.+)?$/, 60 | ], 61 | }) 62 | ``` 63 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vite-plugin-externalize-deps", 3 | "description": "A configurable Vite plugin to help externalize your dependencies (includes subpaths)", 4 | "version": "0.9.0", 5 | "author": "David Myers ", 6 | "funding": "https://github.com/sponsors/voracious", 7 | "homepage": "https://github.com/voracious/vite-plugin-externalize-deps", 8 | "license": "MIT", 9 | "repository": { 10 | "type": "git", 11 | "url": "git+https://github.com/voracious/vite-plugin-externalize-deps.git" 12 | }, 13 | "keywords": [ 14 | "dependencies", 15 | "dev", 16 | "utils", 17 | "vite", 18 | "vite-plugin" 19 | ], 20 | "type": "module", 21 | "main": "./dist/index.cjs", 22 | "module": "./dist/index.js", 23 | "types": "./dist/index.d.ts", 24 | "exports": { 25 | ".": { 26 | "types": "./dist/index.d.ts", 27 | "require": "./dist/index.cjs", 28 | "import": "./dist/index.js" 29 | } 30 | }, 31 | "scripts": { 32 | "build": "vite build && tsc", 33 | "test": "vite build -c test/vite.config.ts" 34 | }, 35 | "packageManager": "pnpm@8.3.1", 36 | "devDependencies": { 37 | "@rollup/plugin-node-resolve": "^16.0.0", 38 | "@types/node": "^22.10.2", 39 | "typescript": "^5.7.2", 40 | "vite": "^6.0.4", 41 | "vite-plugin-externalize-deps": "^0.8.0", 42 | "vite-plugin-inspect": "^0.10.3" 43 | }, 44 | "peerDependencies": { 45 | "vite": "^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0" 46 | }, 47 | "publishConfig": { 48 | "access": "public" 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /pnpm-lock.yaml: -------------------------------------------------------------------------------- 1 | lockfileVersion: '9.0' 2 | 3 | settings: 4 | autoInstallPeers: true 5 | excludeLinksFromLockfile: false 6 | 7 | importers: 8 | 9 | .: 10 | devDependencies: 11 | '@rollup/plugin-node-resolve': 12 | specifier: ^16.0.0 13 | version: 16.0.0(rollup@3.11.0) 14 | '@types/node': 15 | specifier: ^22.10.2 16 | version: 22.10.2 17 | typescript: 18 | specifier: ^5.7.2 19 | version: 5.7.2 20 | vite: 21 | specifier: ^6.0.4 22 | version: 6.0.4(@types/node@22.10.2) 23 | vite-plugin-externalize-deps: 24 | specifier: ^0.8.0 25 | version: 0.8.0(vite@6.0.4(@types/node@22.10.2)) 26 | vite-plugin-inspect: 27 | specifier: ^0.10.3 28 | version: 0.10.3(rollup@3.11.0)(vite@6.0.4(@types/node@22.10.2)) 29 | 30 | packages: 31 | 32 | '@antfu/utils@0.7.10': 33 | resolution: {integrity: sha512-+562v9k4aI80m1+VuMHehNJWLOFjBnXn3tdOitzD0il5b7smkSBal4+a3oKiQTbrwMmN/TBUMDvbdoWDehgOww==} 34 | 35 | '@esbuild/aix-ppc64@0.24.0': 36 | resolution: {integrity: sha512-WtKdFM7ls47zkKHFVzMz8opM7LkcsIp9amDUBIAWirg70RM71WRSjdILPsY5Uv1D42ZpUfaPILDlfactHgsRkw==} 37 | engines: {node: '>=18'} 38 | cpu: [ppc64] 39 | os: [aix] 40 | 41 | '@esbuild/android-arm64@0.24.0': 42 | resolution: {integrity: sha512-Vsm497xFM7tTIPYK9bNTYJyF/lsP590Qc1WxJdlB6ljCbdZKU9SY8i7+Iin4kyhV/KV5J2rOKsBQbB77Ab7L/w==} 43 | engines: {node: '>=18'} 44 | cpu: [arm64] 45 | os: [android] 46 | 47 | '@esbuild/android-arm@0.24.0': 48 | resolution: {integrity: sha512-arAtTPo76fJ/ICkXWetLCc9EwEHKaeya4vMrReVlEIUCAUncH7M4bhMQ+M9Vf+FFOZJdTNMXNBrWwW+OXWpSew==} 49 | engines: {node: '>=18'} 50 | cpu: [arm] 51 | os: [android] 52 | 53 | '@esbuild/android-x64@0.24.0': 54 | resolution: {integrity: sha512-t8GrvnFkiIY7pa7mMgJd7p8p8qqYIz1NYiAoKc75Zyv73L3DZW++oYMSHPRarcotTKuSs6m3hTOa5CKHaS02TQ==} 55 | engines: {node: '>=18'} 56 | cpu: [x64] 57 | os: [android] 58 | 59 | '@esbuild/darwin-arm64@0.24.0': 60 | resolution: {integrity: sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw==} 61 | engines: {node: '>=18'} 62 | cpu: [arm64] 63 | os: [darwin] 64 | 65 | '@esbuild/darwin-x64@0.24.0': 66 | resolution: {integrity: sha512-rgtz6flkVkh58od4PwTRqxbKH9cOjaXCMZgWD905JOzjFKW+7EiUObfd/Kav+A6Gyud6WZk9w+xu6QLytdi2OA==} 67 | engines: {node: '>=18'} 68 | cpu: [x64] 69 | os: [darwin] 70 | 71 | '@esbuild/freebsd-arm64@0.24.0': 72 | resolution: {integrity: sha512-6Mtdq5nHggwfDNLAHkPlyLBpE5L6hwsuXZX8XNmHno9JuL2+bg2BX5tRkwjyfn6sKbxZTq68suOjgWqCicvPXA==} 73 | engines: {node: '>=18'} 74 | cpu: [arm64] 75 | os: [freebsd] 76 | 77 | '@esbuild/freebsd-x64@0.24.0': 78 | resolution: {integrity: sha512-D3H+xh3/zphoX8ck4S2RxKR6gHlHDXXzOf6f/9dbFt/NRBDIE33+cVa49Kil4WUjxMGW0ZIYBYtaGCa2+OsQwQ==} 79 | engines: {node: '>=18'} 80 | cpu: [x64] 81 | os: [freebsd] 82 | 83 | '@esbuild/linux-arm64@0.24.0': 84 | resolution: {integrity: sha512-TDijPXTOeE3eaMkRYpcy3LarIg13dS9wWHRdwYRnzlwlA370rNdZqbcp0WTyyV/k2zSxfko52+C7jU5F9Tfj1g==} 85 | engines: {node: '>=18'} 86 | cpu: [arm64] 87 | os: [linux] 88 | 89 | '@esbuild/linux-arm@0.24.0': 90 | resolution: {integrity: sha512-gJKIi2IjRo5G6Glxb8d3DzYXlxdEj2NlkixPsqePSZMhLudqPhtZ4BUrpIuTjJYXxvF9njql+vRjB2oaC9XpBw==} 91 | engines: {node: '>=18'} 92 | cpu: [arm] 93 | os: [linux] 94 | 95 | '@esbuild/linux-ia32@0.24.0': 96 | resolution: {integrity: sha512-K40ip1LAcA0byL05TbCQ4yJ4swvnbzHscRmUilrmP9Am7//0UjPreh4lpYzvThT2Quw66MhjG//20mrufm40mA==} 97 | engines: {node: '>=18'} 98 | cpu: [ia32] 99 | os: [linux] 100 | 101 | '@esbuild/linux-loong64@0.24.0': 102 | resolution: {integrity: sha512-0mswrYP/9ai+CU0BzBfPMZ8RVm3RGAN/lmOMgW4aFUSOQBjA31UP8Mr6DDhWSuMwj7jaWOT0p0WoZ6jeHhrD7g==} 103 | engines: {node: '>=18'} 104 | cpu: [loong64] 105 | os: [linux] 106 | 107 | '@esbuild/linux-mips64el@0.24.0': 108 | resolution: {integrity: sha512-hIKvXm0/3w/5+RDtCJeXqMZGkI2s4oMUGj3/jM0QzhgIASWrGO5/RlzAzm5nNh/awHE0A19h/CvHQe6FaBNrRA==} 109 | engines: {node: '>=18'} 110 | cpu: [mips64el] 111 | os: [linux] 112 | 113 | '@esbuild/linux-ppc64@0.24.0': 114 | resolution: {integrity: sha512-HcZh5BNq0aC52UoocJxaKORfFODWXZxtBaaZNuN3PUX3MoDsChsZqopzi5UupRhPHSEHotoiptqikjN/B77mYQ==} 115 | engines: {node: '>=18'} 116 | cpu: [ppc64] 117 | os: [linux] 118 | 119 | '@esbuild/linux-riscv64@0.24.0': 120 | resolution: {integrity: sha512-bEh7dMn/h3QxeR2KTy1DUszQjUrIHPZKyO6aN1X4BCnhfYhuQqedHaa5MxSQA/06j3GpiIlFGSsy1c7Gf9padw==} 121 | engines: {node: '>=18'} 122 | cpu: [riscv64] 123 | os: [linux] 124 | 125 | '@esbuild/linux-s390x@0.24.0': 126 | resolution: {integrity: sha512-ZcQ6+qRkw1UcZGPyrCiHHkmBaj9SiCD8Oqd556HldP+QlpUIe2Wgn3ehQGVoPOvZvtHm8HPx+bH20c9pvbkX3g==} 127 | engines: {node: '>=18'} 128 | cpu: [s390x] 129 | os: [linux] 130 | 131 | '@esbuild/linux-x64@0.24.0': 132 | resolution: {integrity: sha512-vbutsFqQ+foy3wSSbmjBXXIJ6PL3scghJoM8zCL142cGaZKAdCZHyf+Bpu/MmX9zT9Q0zFBVKb36Ma5Fzfa8xA==} 133 | engines: {node: '>=18'} 134 | cpu: [x64] 135 | os: [linux] 136 | 137 | '@esbuild/netbsd-x64@0.24.0': 138 | resolution: {integrity: sha512-hjQ0R/ulkO8fCYFsG0FZoH+pWgTTDreqpqY7UnQntnaKv95uP5iW3+dChxnx7C3trQQU40S+OgWhUVwCjVFLvg==} 139 | engines: {node: '>=18'} 140 | cpu: [x64] 141 | os: [netbsd] 142 | 143 | '@esbuild/openbsd-arm64@0.24.0': 144 | resolution: {integrity: sha512-MD9uzzkPQbYehwcN583yx3Tu5M8EIoTD+tUgKF982WYL9Pf5rKy9ltgD0eUgs8pvKnmizxjXZyLt0z6DC3rRXg==} 145 | engines: {node: '>=18'} 146 | cpu: [arm64] 147 | os: [openbsd] 148 | 149 | '@esbuild/openbsd-x64@0.24.0': 150 | resolution: {integrity: sha512-4ir0aY1NGUhIC1hdoCzr1+5b43mw99uNwVzhIq1OY3QcEwPDO3B7WNXBzaKY5Nsf1+N11i1eOfFcq+D/gOS15Q==} 151 | engines: {node: '>=18'} 152 | cpu: [x64] 153 | os: [openbsd] 154 | 155 | '@esbuild/sunos-x64@0.24.0': 156 | resolution: {integrity: sha512-jVzdzsbM5xrotH+W5f1s+JtUy1UWgjU0Cf4wMvffTB8m6wP5/kx0KiaLHlbJO+dMgtxKV8RQ/JvtlFcdZ1zCPA==} 157 | engines: {node: '>=18'} 158 | cpu: [x64] 159 | os: [sunos] 160 | 161 | '@esbuild/win32-arm64@0.24.0': 162 | resolution: {integrity: sha512-iKc8GAslzRpBytO2/aN3d2yb2z8XTVfNV0PjGlCxKo5SgWmNXx82I/Q3aG1tFfS+A2igVCY97TJ8tnYwpUWLCA==} 163 | engines: {node: '>=18'} 164 | cpu: [arm64] 165 | os: [win32] 166 | 167 | '@esbuild/win32-ia32@0.24.0': 168 | resolution: {integrity: sha512-vQW36KZolfIudCcTnaTpmLQ24Ha1RjygBo39/aLkM2kmjkWmZGEJ5Gn9l5/7tzXA42QGIoWbICfg6KLLkIw6yw==} 169 | engines: {node: '>=18'} 170 | cpu: [ia32] 171 | os: [win32] 172 | 173 | '@esbuild/win32-x64@0.24.0': 174 | resolution: {integrity: sha512-7IAFPrjSQIJrGsK6flwg7NFmwBoSTyF3rl7If0hNUFQU4ilTsEPL6GuMuU9BfIWVVGuRnuIidkSMC+c0Otu8IA==} 175 | engines: {node: '>=18'} 176 | cpu: [x64] 177 | os: [win32] 178 | 179 | '@polka/url@1.0.0-next.28': 180 | resolution: {integrity: sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==} 181 | 182 | '@rollup/plugin-node-resolve@16.0.0': 183 | resolution: {integrity: sha512-0FPvAeVUT/zdWoO0jnb/V5BlBsUSNfkIOtFHzMO4H9MOklrmQFY6FduVHKucNb/aTFxvnGhj4MNj/T1oNdDfNg==} 184 | engines: {node: '>=14.0.0'} 185 | peerDependencies: 186 | rollup: ^2.78.0||^3.0.0||^4.0.0 187 | peerDependenciesMeta: 188 | rollup: 189 | optional: true 190 | 191 | '@rollup/pluginutils@5.0.2': 192 | resolution: {integrity: sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==} 193 | engines: {node: '>=14.0.0'} 194 | peerDependencies: 195 | rollup: ^1.20.0||^2.0.0||^3.0.0 196 | peerDependenciesMeta: 197 | rollup: 198 | optional: true 199 | 200 | '@rollup/pluginutils@5.1.4': 201 | resolution: {integrity: sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==} 202 | engines: {node: '>=14.0.0'} 203 | peerDependencies: 204 | rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 205 | peerDependenciesMeta: 206 | rollup: 207 | optional: true 208 | 209 | '@rollup/rollup-android-arm-eabi@4.28.1': 210 | resolution: {integrity: sha512-2aZp8AES04KI2dy3Ss6/MDjXbwBzj+i0GqKtWXgw2/Ma6E4jJvujryO6gJAghIRVz7Vwr9Gtl/8na3nDUKpraQ==} 211 | cpu: [arm] 212 | os: [android] 213 | 214 | '@rollup/rollup-android-arm64@4.28.1': 215 | resolution: {integrity: sha512-EbkK285O+1YMrg57xVA+Dp0tDBRB93/BZKph9XhMjezf6F4TpYjaUSuPt5J0fZXlSag0LmZAsTmdGGqPp4pQFA==} 216 | cpu: [arm64] 217 | os: [android] 218 | 219 | '@rollup/rollup-darwin-arm64@4.28.1': 220 | resolution: {integrity: sha512-prduvrMKU6NzMq6nxzQw445zXgaDBbMQvmKSJaxpaZ5R1QDM8w+eGxo6Y/jhT/cLoCvnZI42oEqf9KQNYz1fqQ==} 221 | cpu: [arm64] 222 | os: [darwin] 223 | 224 | '@rollup/rollup-darwin-x64@4.28.1': 225 | resolution: {integrity: sha512-WsvbOunsUk0wccO/TV4o7IKgloJ942hVFK1CLatwv6TJspcCZb9umQkPdvB7FihmdxgaKR5JyxDjWpCOp4uZlQ==} 226 | cpu: [x64] 227 | os: [darwin] 228 | 229 | '@rollup/rollup-freebsd-arm64@4.28.1': 230 | resolution: {integrity: sha512-HTDPdY1caUcU4qK23FeeGxCdJF64cKkqajU0iBnTVxS8F7H/7BewvYoG+va1KPSL63kQ1PGNyiwKOfReavzvNA==} 231 | cpu: [arm64] 232 | os: [freebsd] 233 | 234 | '@rollup/rollup-freebsd-x64@4.28.1': 235 | resolution: {integrity: sha512-m/uYasxkUevcFTeRSM9TeLyPe2QDuqtjkeoTpP9SW0XxUWfcYrGDMkO/m2tTw+4NMAF9P2fU3Mw4ahNvo7QmsQ==} 236 | cpu: [x64] 237 | os: [freebsd] 238 | 239 | '@rollup/rollup-linux-arm-gnueabihf@4.28.1': 240 | resolution: {integrity: sha512-QAg11ZIt6mcmzpNE6JZBpKfJaKkqTm1A9+y9O+frdZJEuhQxiugM05gnCWiANHj4RmbgeVJpTdmKRmH/a+0QbA==} 241 | cpu: [arm] 242 | os: [linux] 243 | 244 | '@rollup/rollup-linux-arm-musleabihf@4.28.1': 245 | resolution: {integrity: sha512-dRP9PEBfolq1dmMcFqbEPSd9VlRuVWEGSmbxVEfiq2cs2jlZAl0YNxFzAQS2OrQmsLBLAATDMb3Z6MFv5vOcXg==} 246 | cpu: [arm] 247 | os: [linux] 248 | 249 | '@rollup/rollup-linux-arm64-gnu@4.28.1': 250 | resolution: {integrity: sha512-uGr8khxO+CKT4XU8ZUH1TTEUtlktK6Kgtv0+6bIFSeiSlnGJHG1tSFSjm41uQ9sAO/5ULx9mWOz70jYLyv1QkA==} 251 | cpu: [arm64] 252 | os: [linux] 253 | 254 | '@rollup/rollup-linux-arm64-musl@4.28.1': 255 | resolution: {integrity: sha512-QF54q8MYGAqMLrX2t7tNpi01nvq5RI59UBNx+3+37zoKX5KViPo/gk2QLhsuqok05sSCRluj0D00LzCwBikb0A==} 256 | cpu: [arm64] 257 | os: [linux] 258 | 259 | '@rollup/rollup-linux-loongarch64-gnu@4.28.1': 260 | resolution: {integrity: sha512-vPul4uodvWvLhRco2w0GcyZcdyBfpfDRgNKU+p35AWEbJ/HPs1tOUrkSueVbBS0RQHAf/A+nNtDpvw95PeVKOA==} 261 | cpu: [loong64] 262 | os: [linux] 263 | 264 | '@rollup/rollup-linux-powerpc64le-gnu@4.28.1': 265 | resolution: {integrity: sha512-pTnTdBuC2+pt1Rmm2SV7JWRqzhYpEILML4PKODqLz+C7Ou2apEV52h19CR7es+u04KlqplggmN9sqZlekg3R1A==} 266 | cpu: [ppc64] 267 | os: [linux] 268 | 269 | '@rollup/rollup-linux-riscv64-gnu@4.28.1': 270 | resolution: {integrity: sha512-vWXy1Nfg7TPBSuAncfInmAI/WZDd5vOklyLJDdIRKABcZWojNDY0NJwruY2AcnCLnRJKSaBgf/GiJfauu8cQZA==} 271 | cpu: [riscv64] 272 | os: [linux] 273 | 274 | '@rollup/rollup-linux-s390x-gnu@4.28.1': 275 | resolution: {integrity: sha512-/yqC2Y53oZjb0yz8PVuGOQQNOTwxcizudunl/tFs1aLvObTclTwZ0JhXF2XcPT/zuaymemCDSuuUPXJJyqeDOg==} 276 | cpu: [s390x] 277 | os: [linux] 278 | 279 | '@rollup/rollup-linux-x64-gnu@4.28.1': 280 | resolution: {integrity: sha512-fzgeABz7rrAlKYB0y2kSEiURrI0691CSL0+KXwKwhxvj92VULEDQLpBYLHpF49MSiPG4sq5CK3qHMnb9tlCjBw==} 281 | cpu: [x64] 282 | os: [linux] 283 | 284 | '@rollup/rollup-linux-x64-musl@4.28.1': 285 | resolution: {integrity: sha512-xQTDVzSGiMlSshpJCtudbWyRfLaNiVPXt1WgdWTwWz9n0U12cI2ZVtWe/Jgwyv/6wjL7b66uu61Vg0POWVfz4g==} 286 | cpu: [x64] 287 | os: [linux] 288 | 289 | '@rollup/rollup-win32-arm64-msvc@4.28.1': 290 | resolution: {integrity: sha512-wSXmDRVupJstFP7elGMgv+2HqXelQhuNf+IS4V+nUpNVi/GUiBgDmfwD0UGN3pcAnWsgKG3I52wMOBnk1VHr/A==} 291 | cpu: [arm64] 292 | os: [win32] 293 | 294 | '@rollup/rollup-win32-ia32-msvc@4.28.1': 295 | resolution: {integrity: sha512-ZkyTJ/9vkgrE/Rk9vhMXhf8l9D+eAhbAVbsGsXKy2ohmJaWg0LPQLnIxRdRp/bKyr8tXuPlXhIoGlEB5XpJnGA==} 296 | cpu: [ia32] 297 | os: [win32] 298 | 299 | '@rollup/rollup-win32-x64-msvc@4.28.1': 300 | resolution: {integrity: sha512-ZvK2jBafvttJjoIdKm/Q/Bh7IJ1Ose9IBOwpOXcOvW3ikGTQGmKDgxTC6oCAzW6PynbkKP8+um1du81XJHZ0JA==} 301 | cpu: [x64] 302 | os: [win32] 303 | 304 | '@types/estree@1.0.0': 305 | resolution: {integrity: sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ==} 306 | 307 | '@types/estree@1.0.6': 308 | resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} 309 | 310 | '@types/node@22.10.2': 311 | resolution: {integrity: sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ==} 312 | 313 | '@types/resolve@1.20.2': 314 | resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} 315 | 316 | bundle-name@4.1.0: 317 | resolution: {integrity: sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==} 318 | engines: {node: '>=18'} 319 | 320 | debug@4.4.0: 321 | resolution: {integrity: sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==} 322 | engines: {node: '>=6.0'} 323 | peerDependencies: 324 | supports-color: '*' 325 | peerDependenciesMeta: 326 | supports-color: 327 | optional: true 328 | 329 | deepmerge@4.2.2: 330 | resolution: {integrity: sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==} 331 | engines: {node: '>=0.10.0'} 332 | 333 | default-browser-id@5.0.0: 334 | resolution: {integrity: sha512-A6p/pu/6fyBcA1TRz/GqWYPViplrftcW2gZC9q79ngNCKAeR/X3gcEdXQHl4KNXV+3wgIJ1CPkJQ3IHM6lcsyA==} 335 | engines: {node: '>=18'} 336 | 337 | default-browser@5.2.1: 338 | resolution: {integrity: sha512-WY/3TUME0x3KPYdRRxEJJvXRHV4PyPoUsxtZa78lwItwRQRHhd2U9xOscaT/YTf8uCXIAjeJOFBVEh/7FtD8Xg==} 339 | engines: {node: '>=18'} 340 | 341 | define-lazy-prop@3.0.0: 342 | resolution: {integrity: sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==} 343 | engines: {node: '>=12'} 344 | 345 | error-stack-parser-es@0.1.5: 346 | resolution: {integrity: sha512-xHku1X40RO+fO8yJ8Wh2f2rZWVjqyhb1zgq1yZ8aZRQkv6OOKhKWRUaht3eSCUbAOBaKIgM+ykwFLE+QUxgGeg==} 347 | 348 | esbuild@0.24.0: 349 | resolution: {integrity: sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==} 350 | engines: {node: '>=18'} 351 | hasBin: true 352 | 353 | estree-walker@2.0.2: 354 | resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} 355 | 356 | fs-extra@11.2.0: 357 | resolution: {integrity: sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==} 358 | engines: {node: '>=14.14'} 359 | 360 | fsevents@2.3.3: 361 | resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} 362 | engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} 363 | os: [darwin] 364 | 365 | function-bind@1.1.1: 366 | resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} 367 | 368 | graceful-fs@4.2.10: 369 | resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==} 370 | 371 | has@1.0.3: 372 | resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} 373 | engines: {node: '>= 0.4.0'} 374 | 375 | is-core-module@2.10.0: 376 | resolution: {integrity: sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==} 377 | 378 | is-docker@3.0.0: 379 | resolution: {integrity: sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==} 380 | engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} 381 | hasBin: true 382 | 383 | is-inside-container@1.0.0: 384 | resolution: {integrity: sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==} 385 | engines: {node: '>=14.16'} 386 | hasBin: true 387 | 388 | is-module@1.0.0: 389 | resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} 390 | 391 | is-wsl@3.1.0: 392 | resolution: {integrity: sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==} 393 | engines: {node: '>=16'} 394 | 395 | jsonfile@6.1.0: 396 | resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} 397 | 398 | mrmime@2.0.0: 399 | resolution: {integrity: sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==} 400 | engines: {node: '>=10'} 401 | 402 | ms@2.1.3: 403 | resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} 404 | 405 | nanoid@3.3.8: 406 | resolution: {integrity: sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==} 407 | engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} 408 | hasBin: true 409 | 410 | open@10.1.0: 411 | resolution: {integrity: sha512-mnkeQ1qP5Ue2wd+aivTD3NHd/lZ96Lu0jgf0pwktLPtx6cTZiH7tyeGRRHs0zX0rbrahXPnXlUnbeXyaBBuIaw==} 412 | engines: {node: '>=18'} 413 | 414 | path-parse@1.0.7: 415 | resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} 416 | 417 | perfect-debounce@1.0.0: 418 | resolution: {integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==} 419 | 420 | picocolors@1.1.1: 421 | resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} 422 | 423 | picomatch@2.3.1: 424 | resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} 425 | engines: {node: '>=8.6'} 426 | 427 | picomatch@4.0.2: 428 | resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} 429 | engines: {node: '>=12'} 430 | 431 | postcss@8.4.49: 432 | resolution: {integrity: sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==} 433 | engines: {node: ^10 || ^12 || >=14} 434 | 435 | resolve@1.22.1: 436 | resolution: {integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==} 437 | hasBin: true 438 | 439 | rollup@3.11.0: 440 | resolution: {integrity: sha512-+uWPPkpWQ2H3Qi7sNBcRfhhHJyUNgBYhG4wKe5wuGRj2m55kpo+0p5jubKNBjQODyPe6tSBE3tNpdDwEisQvAQ==} 441 | engines: {node: '>=14.18.0', npm: '>=8.0.0'} 442 | hasBin: true 443 | 444 | rollup@4.28.1: 445 | resolution: {integrity: sha512-61fXYl/qNVinKmGSTHAZ6Yy8I3YIJC/r2m9feHo6SwVAVcLT5MPwOUFe7EuURA/4m0NR8lXG4BBXuo/IZEsjMg==} 446 | engines: {node: '>=18.0.0', npm: '>=8.0.0'} 447 | hasBin: true 448 | 449 | run-applescript@7.0.0: 450 | resolution: {integrity: sha512-9by4Ij99JUr/MCFBUkDKLWK3G9HVXmabKz9U5MlIAIuvuzkiOicRYs8XJLxX+xahD+mLiiCYDqF9dKAgtzKP1A==} 451 | engines: {node: '>=18'} 452 | 453 | sirv@3.0.0: 454 | resolution: {integrity: sha512-BPwJGUeDaDCHihkORDchNyyTvWFhcusy1XMmhEVTQTwGeybFbp8YEmB+njbPnth1FibULBSBVwCQni25XlCUDg==} 455 | engines: {node: '>=18'} 456 | 457 | source-map-js@1.2.1: 458 | resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} 459 | engines: {node: '>=0.10.0'} 460 | 461 | supports-preserve-symlinks-flag@1.0.0: 462 | resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} 463 | engines: {node: '>= 0.4'} 464 | 465 | totalist@3.0.0: 466 | resolution: {integrity: sha512-eM+pCBxXO/njtF7vdFsHuqb+ElbxqtI4r5EAvk6grfAFyJ6IvWlSkfZ5T9ozC6xWw3Fj1fGoSmrl0gUs46JVIw==} 467 | engines: {node: '>=6'} 468 | 469 | typescript@5.7.2: 470 | resolution: {integrity: sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==} 471 | engines: {node: '>=14.17'} 472 | hasBin: true 473 | 474 | undici-types@6.20.0: 475 | resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} 476 | 477 | universalify@2.0.0: 478 | resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} 479 | engines: {node: '>= 10.0.0'} 480 | 481 | vite-plugin-externalize-deps@0.8.0: 482 | resolution: {integrity: sha512-MdC8kRNQ1ZjhUicU2HcqGVhL0UUFqv83Zp1JZdHjE82PoPR8wsSWZ3axpot7B6img3sW6g8shYJikE0CKA0chA==} 483 | peerDependencies: 484 | vite: ^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 485 | 486 | vite-plugin-inspect@0.10.3: 487 | resolution: {integrity: sha512-7scdthVsZLER/IPvqJddS0PeD+gTWqxls4w+Mob7IniJfeCiTn1qeCi4zyXvgKEuCh2CiNsTjoFhovOWxDXTuw==} 488 | engines: {node: '>=14'} 489 | peerDependencies: 490 | '@nuxt/kit': '*' 491 | vite: ^6.0.0 492 | peerDependenciesMeta: 493 | '@nuxt/kit': 494 | optional: true 495 | 496 | vite@6.0.4: 497 | resolution: {integrity: sha512-zwlH6ar+6o6b4Wp+ydhtIKLrGM/LoqZzcdVmkGAFun0KHTzIzjh+h0kungEx7KJg/PYnC80I4TII9WkjciSR6Q==} 498 | engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} 499 | hasBin: true 500 | peerDependencies: 501 | '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 502 | jiti: '>=1.21.0' 503 | less: '*' 504 | lightningcss: ^1.21.0 505 | sass: '*' 506 | sass-embedded: '*' 507 | stylus: '*' 508 | sugarss: '*' 509 | terser: ^5.16.0 510 | tsx: ^4.8.1 511 | yaml: ^2.4.2 512 | peerDependenciesMeta: 513 | '@types/node': 514 | optional: true 515 | jiti: 516 | optional: true 517 | less: 518 | optional: true 519 | lightningcss: 520 | optional: true 521 | sass: 522 | optional: true 523 | sass-embedded: 524 | optional: true 525 | stylus: 526 | optional: true 527 | sugarss: 528 | optional: true 529 | terser: 530 | optional: true 531 | tsx: 532 | optional: true 533 | yaml: 534 | optional: true 535 | 536 | snapshots: 537 | 538 | '@antfu/utils@0.7.10': {} 539 | 540 | '@esbuild/aix-ppc64@0.24.0': 541 | optional: true 542 | 543 | '@esbuild/android-arm64@0.24.0': 544 | optional: true 545 | 546 | '@esbuild/android-arm@0.24.0': 547 | optional: true 548 | 549 | '@esbuild/android-x64@0.24.0': 550 | optional: true 551 | 552 | '@esbuild/darwin-arm64@0.24.0': 553 | optional: true 554 | 555 | '@esbuild/darwin-x64@0.24.0': 556 | optional: true 557 | 558 | '@esbuild/freebsd-arm64@0.24.0': 559 | optional: true 560 | 561 | '@esbuild/freebsd-x64@0.24.0': 562 | optional: true 563 | 564 | '@esbuild/linux-arm64@0.24.0': 565 | optional: true 566 | 567 | '@esbuild/linux-arm@0.24.0': 568 | optional: true 569 | 570 | '@esbuild/linux-ia32@0.24.0': 571 | optional: true 572 | 573 | '@esbuild/linux-loong64@0.24.0': 574 | optional: true 575 | 576 | '@esbuild/linux-mips64el@0.24.0': 577 | optional: true 578 | 579 | '@esbuild/linux-ppc64@0.24.0': 580 | optional: true 581 | 582 | '@esbuild/linux-riscv64@0.24.0': 583 | optional: true 584 | 585 | '@esbuild/linux-s390x@0.24.0': 586 | optional: true 587 | 588 | '@esbuild/linux-x64@0.24.0': 589 | optional: true 590 | 591 | '@esbuild/netbsd-x64@0.24.0': 592 | optional: true 593 | 594 | '@esbuild/openbsd-arm64@0.24.0': 595 | optional: true 596 | 597 | '@esbuild/openbsd-x64@0.24.0': 598 | optional: true 599 | 600 | '@esbuild/sunos-x64@0.24.0': 601 | optional: true 602 | 603 | '@esbuild/win32-arm64@0.24.0': 604 | optional: true 605 | 606 | '@esbuild/win32-ia32@0.24.0': 607 | optional: true 608 | 609 | '@esbuild/win32-x64@0.24.0': 610 | optional: true 611 | 612 | '@polka/url@1.0.0-next.28': {} 613 | 614 | '@rollup/plugin-node-resolve@16.0.0(rollup@3.11.0)': 615 | dependencies: 616 | '@rollup/pluginutils': 5.0.2(rollup@3.11.0) 617 | '@types/resolve': 1.20.2 618 | deepmerge: 4.2.2 619 | is-module: 1.0.0 620 | resolve: 1.22.1 621 | optionalDependencies: 622 | rollup: 3.11.0 623 | 624 | '@rollup/pluginutils@5.0.2(rollup@3.11.0)': 625 | dependencies: 626 | '@types/estree': 1.0.0 627 | estree-walker: 2.0.2 628 | picomatch: 2.3.1 629 | optionalDependencies: 630 | rollup: 3.11.0 631 | 632 | '@rollup/pluginutils@5.1.4(rollup@3.11.0)': 633 | dependencies: 634 | '@types/estree': 1.0.6 635 | estree-walker: 2.0.2 636 | picomatch: 4.0.2 637 | optionalDependencies: 638 | rollup: 3.11.0 639 | 640 | '@rollup/rollup-android-arm-eabi@4.28.1': 641 | optional: true 642 | 643 | '@rollup/rollup-android-arm64@4.28.1': 644 | optional: true 645 | 646 | '@rollup/rollup-darwin-arm64@4.28.1': 647 | optional: true 648 | 649 | '@rollup/rollup-darwin-x64@4.28.1': 650 | optional: true 651 | 652 | '@rollup/rollup-freebsd-arm64@4.28.1': 653 | optional: true 654 | 655 | '@rollup/rollup-freebsd-x64@4.28.1': 656 | optional: true 657 | 658 | '@rollup/rollup-linux-arm-gnueabihf@4.28.1': 659 | optional: true 660 | 661 | '@rollup/rollup-linux-arm-musleabihf@4.28.1': 662 | optional: true 663 | 664 | '@rollup/rollup-linux-arm64-gnu@4.28.1': 665 | optional: true 666 | 667 | '@rollup/rollup-linux-arm64-musl@4.28.1': 668 | optional: true 669 | 670 | '@rollup/rollup-linux-loongarch64-gnu@4.28.1': 671 | optional: true 672 | 673 | '@rollup/rollup-linux-powerpc64le-gnu@4.28.1': 674 | optional: true 675 | 676 | '@rollup/rollup-linux-riscv64-gnu@4.28.1': 677 | optional: true 678 | 679 | '@rollup/rollup-linux-s390x-gnu@4.28.1': 680 | optional: true 681 | 682 | '@rollup/rollup-linux-x64-gnu@4.28.1': 683 | optional: true 684 | 685 | '@rollup/rollup-linux-x64-musl@4.28.1': 686 | optional: true 687 | 688 | '@rollup/rollup-win32-arm64-msvc@4.28.1': 689 | optional: true 690 | 691 | '@rollup/rollup-win32-ia32-msvc@4.28.1': 692 | optional: true 693 | 694 | '@rollup/rollup-win32-x64-msvc@4.28.1': 695 | optional: true 696 | 697 | '@types/estree@1.0.0': {} 698 | 699 | '@types/estree@1.0.6': {} 700 | 701 | '@types/node@22.10.2': 702 | dependencies: 703 | undici-types: 6.20.0 704 | 705 | '@types/resolve@1.20.2': {} 706 | 707 | bundle-name@4.1.0: 708 | dependencies: 709 | run-applescript: 7.0.0 710 | 711 | debug@4.4.0: 712 | dependencies: 713 | ms: 2.1.3 714 | 715 | deepmerge@4.2.2: {} 716 | 717 | default-browser-id@5.0.0: {} 718 | 719 | default-browser@5.2.1: 720 | dependencies: 721 | bundle-name: 4.1.0 722 | default-browser-id: 5.0.0 723 | 724 | define-lazy-prop@3.0.0: {} 725 | 726 | error-stack-parser-es@0.1.5: {} 727 | 728 | esbuild@0.24.0: 729 | optionalDependencies: 730 | '@esbuild/aix-ppc64': 0.24.0 731 | '@esbuild/android-arm': 0.24.0 732 | '@esbuild/android-arm64': 0.24.0 733 | '@esbuild/android-x64': 0.24.0 734 | '@esbuild/darwin-arm64': 0.24.0 735 | '@esbuild/darwin-x64': 0.24.0 736 | '@esbuild/freebsd-arm64': 0.24.0 737 | '@esbuild/freebsd-x64': 0.24.0 738 | '@esbuild/linux-arm': 0.24.0 739 | '@esbuild/linux-arm64': 0.24.0 740 | '@esbuild/linux-ia32': 0.24.0 741 | '@esbuild/linux-loong64': 0.24.0 742 | '@esbuild/linux-mips64el': 0.24.0 743 | '@esbuild/linux-ppc64': 0.24.0 744 | '@esbuild/linux-riscv64': 0.24.0 745 | '@esbuild/linux-s390x': 0.24.0 746 | '@esbuild/linux-x64': 0.24.0 747 | '@esbuild/netbsd-x64': 0.24.0 748 | '@esbuild/openbsd-arm64': 0.24.0 749 | '@esbuild/openbsd-x64': 0.24.0 750 | '@esbuild/sunos-x64': 0.24.0 751 | '@esbuild/win32-arm64': 0.24.0 752 | '@esbuild/win32-ia32': 0.24.0 753 | '@esbuild/win32-x64': 0.24.0 754 | 755 | estree-walker@2.0.2: {} 756 | 757 | fs-extra@11.2.0: 758 | dependencies: 759 | graceful-fs: 4.2.10 760 | jsonfile: 6.1.0 761 | universalify: 2.0.0 762 | 763 | fsevents@2.3.3: 764 | optional: true 765 | 766 | function-bind@1.1.1: {} 767 | 768 | graceful-fs@4.2.10: {} 769 | 770 | has@1.0.3: 771 | dependencies: 772 | function-bind: 1.1.1 773 | 774 | is-core-module@2.10.0: 775 | dependencies: 776 | has: 1.0.3 777 | 778 | is-docker@3.0.0: {} 779 | 780 | is-inside-container@1.0.0: 781 | dependencies: 782 | is-docker: 3.0.0 783 | 784 | is-module@1.0.0: {} 785 | 786 | is-wsl@3.1.0: 787 | dependencies: 788 | is-inside-container: 1.0.0 789 | 790 | jsonfile@6.1.0: 791 | dependencies: 792 | universalify: 2.0.0 793 | optionalDependencies: 794 | graceful-fs: 4.2.10 795 | 796 | mrmime@2.0.0: {} 797 | 798 | ms@2.1.3: {} 799 | 800 | nanoid@3.3.8: {} 801 | 802 | open@10.1.0: 803 | dependencies: 804 | default-browser: 5.2.1 805 | define-lazy-prop: 3.0.0 806 | is-inside-container: 1.0.0 807 | is-wsl: 3.1.0 808 | 809 | path-parse@1.0.7: {} 810 | 811 | perfect-debounce@1.0.0: {} 812 | 813 | picocolors@1.1.1: {} 814 | 815 | picomatch@2.3.1: {} 816 | 817 | picomatch@4.0.2: {} 818 | 819 | postcss@8.4.49: 820 | dependencies: 821 | nanoid: 3.3.8 822 | picocolors: 1.1.1 823 | source-map-js: 1.2.1 824 | 825 | resolve@1.22.1: 826 | dependencies: 827 | is-core-module: 2.10.0 828 | path-parse: 1.0.7 829 | supports-preserve-symlinks-flag: 1.0.0 830 | 831 | rollup@3.11.0: 832 | optionalDependencies: 833 | fsevents: 2.3.3 834 | optional: true 835 | 836 | rollup@4.28.1: 837 | dependencies: 838 | '@types/estree': 1.0.6 839 | optionalDependencies: 840 | '@rollup/rollup-android-arm-eabi': 4.28.1 841 | '@rollup/rollup-android-arm64': 4.28.1 842 | '@rollup/rollup-darwin-arm64': 4.28.1 843 | '@rollup/rollup-darwin-x64': 4.28.1 844 | '@rollup/rollup-freebsd-arm64': 4.28.1 845 | '@rollup/rollup-freebsd-x64': 4.28.1 846 | '@rollup/rollup-linux-arm-gnueabihf': 4.28.1 847 | '@rollup/rollup-linux-arm-musleabihf': 4.28.1 848 | '@rollup/rollup-linux-arm64-gnu': 4.28.1 849 | '@rollup/rollup-linux-arm64-musl': 4.28.1 850 | '@rollup/rollup-linux-loongarch64-gnu': 4.28.1 851 | '@rollup/rollup-linux-powerpc64le-gnu': 4.28.1 852 | '@rollup/rollup-linux-riscv64-gnu': 4.28.1 853 | '@rollup/rollup-linux-s390x-gnu': 4.28.1 854 | '@rollup/rollup-linux-x64-gnu': 4.28.1 855 | '@rollup/rollup-linux-x64-musl': 4.28.1 856 | '@rollup/rollup-win32-arm64-msvc': 4.28.1 857 | '@rollup/rollup-win32-ia32-msvc': 4.28.1 858 | '@rollup/rollup-win32-x64-msvc': 4.28.1 859 | fsevents: 2.3.3 860 | 861 | run-applescript@7.0.0: {} 862 | 863 | sirv@3.0.0: 864 | dependencies: 865 | '@polka/url': 1.0.0-next.28 866 | mrmime: 2.0.0 867 | totalist: 3.0.0 868 | 869 | source-map-js@1.2.1: {} 870 | 871 | supports-preserve-symlinks-flag@1.0.0: {} 872 | 873 | totalist@3.0.0: {} 874 | 875 | typescript@5.7.2: {} 876 | 877 | undici-types@6.20.0: {} 878 | 879 | universalify@2.0.0: {} 880 | 881 | vite-plugin-externalize-deps@0.8.0(vite@6.0.4(@types/node@22.10.2)): 882 | dependencies: 883 | vite: 6.0.4(@types/node@22.10.2) 884 | 885 | vite-plugin-inspect@0.10.3(rollup@3.11.0)(vite@6.0.4(@types/node@22.10.2)): 886 | dependencies: 887 | '@antfu/utils': 0.7.10 888 | '@rollup/pluginutils': 5.1.4(rollup@3.11.0) 889 | debug: 4.4.0 890 | error-stack-parser-es: 0.1.5 891 | fs-extra: 11.2.0 892 | open: 10.1.0 893 | perfect-debounce: 1.0.0 894 | picocolors: 1.1.1 895 | sirv: 3.0.0 896 | vite: 6.0.4(@types/node@22.10.2) 897 | transitivePeerDependencies: 898 | - rollup 899 | - supports-color 900 | 901 | vite@6.0.4(@types/node@22.10.2): 902 | dependencies: 903 | esbuild: 0.24.0 904 | postcss: 8.4.49 905 | rollup: 4.28.1 906 | optionalDependencies: 907 | '@types/node': 22.10.2 908 | fsevents: 2.3.3 909 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | import { existsSync, readFileSync } from 'node:fs' 2 | import { builtinModules } from 'node:module' 3 | import { join } from 'node:path' 4 | import type { Plugin } from 'vite' 5 | 6 | interface UserOptions { 7 | deps: boolean, 8 | devDeps: boolean, 9 | except: Array, 10 | /** 11 | * Additional dependencies to externalize. 12 | * 13 | * @example 14 | * 15 | * ```ts 16 | * externalizeDeps({ 17 | * include: [ 18 | * /^unlisted-dep(?:\/.*)?$/, 19 | * ], 20 | * }) 21 | * ``` 22 | * 23 | * @default [] 24 | */ 25 | include: Array, 26 | nodeBuiltins: boolean, 27 | optionalDeps: boolean, 28 | peerDeps: boolean, 29 | useFile: string, 30 | } 31 | 32 | const parseFile = (file: string) => { 33 | return JSON.parse(readFileSync(file).toString()) 34 | } 35 | 36 | /** 37 | * Returns a Vite plugin to exclude dependencies from the bundle. 38 | * 39 | * @example 40 | * 41 | * ```ts 42 | * // vite.config.ts 43 | * import { defineConfig } from 'vite' 44 | * import { externalizeDeps } from 'vite-plugin-externalize-deps' 45 | * 46 | * export default defineConfig({ 47 | * plugins: [ 48 | * externalizeDeps({ 49 | * deps: true, 50 | * devDeps: false, 51 | * except: [ 52 | * // Match exact values with strings. 53 | * '@some/obscure/dependency', 54 | * // Or match patterns with regular expressions. 55 | * /^@some\/obscure(?:\/.+)?$/, 56 | * ], 57 | * include: [ 58 | * // Match exact values with strings. 59 | * '@some/obscure/dependency', 60 | * // Or match patterns with regular expressions. 61 | * /^@some\/obscure(?:\/.+)?$/, 62 | * ], 63 | * nodeBuiltins: true, 64 | * optionalDeps: true, 65 | * peerDeps: true, 66 | * useFile: join(process.cwd(), 'package.json'), 67 | * }), 68 | * ], 69 | * }) 70 | * ``` 71 | */ 72 | export const externalizeDeps = (options: Partial = {}): Plugin => { 73 | const optionsResolved: UserOptions = { 74 | deps: true, 75 | devDeps: false, 76 | except: [], 77 | include: [], 78 | nodeBuiltins: true, 79 | optionalDeps: true, 80 | peerDeps: true, 81 | useFile: join(process.cwd(), 'package.json'), 82 | // User options take priority. 83 | ...options, 84 | } 85 | 86 | return { 87 | name: 'vite-plugin-externalize-deps', 88 | config: (_config, _env) => { 89 | if (!existsSync(optionsResolved.useFile)) { 90 | throw new Error(`[vite-plugin-externalize-deps] The file specified for useFile (${optionsResolved.useFile}) does not exist.`) 91 | } 92 | 93 | const externalDeps = new Set() 94 | const { 95 | dependencies = {}, 96 | devDependencies = {}, 97 | optionalDependencies = {}, 98 | peerDependencies = {}, 99 | } = parseFile(optionsResolved.useFile) 100 | 101 | if (optionsResolved.deps) { 102 | Object.keys(dependencies).forEach((dep) => { 103 | const depMatcher = new RegExp(`^${dep}(?:/.+)?$`) 104 | 105 | externalDeps.add(depMatcher) 106 | }) 107 | } 108 | 109 | if (optionsResolved.devDeps) { 110 | Object.keys(devDependencies).forEach((dep) => { 111 | const depMatcher = new RegExp(`^${dep}(?:/.+)?$`) 112 | 113 | externalDeps.add(depMatcher) 114 | }) 115 | } 116 | 117 | if (optionsResolved.nodeBuiltins) { 118 | builtinModules.forEach((builtinModule) => { 119 | const builtinMatcher = new RegExp(`^(?:node:)?${builtinModule}$`) 120 | 121 | externalDeps.add(builtinMatcher) 122 | }) 123 | } 124 | 125 | if (optionsResolved.optionalDeps) { 126 | Object.keys(optionalDependencies).forEach((dep) => { 127 | const depMatcher = new RegExp(`^${dep}(?:/.+)?$`) 128 | 129 | externalDeps.add(depMatcher) 130 | }) 131 | } 132 | 133 | if (optionsResolved.peerDeps) { 134 | Object.keys(peerDependencies).forEach((dep) => { 135 | const depMatcher = new RegExp(`^${dep}(?:/.+)?$`) 136 | 137 | externalDeps.add(depMatcher) 138 | }) 139 | } 140 | 141 | const depMatchers = Array.from(externalDeps) 142 | 143 | const isException = (id: string) => { 144 | return optionsResolved.except.some((exception) => { 145 | if (typeof exception === 'string') { 146 | return exception === id 147 | } 148 | 149 | return exception.test(id) 150 | }) 151 | } 152 | 153 | const isIncluded = (id: string) => { 154 | return optionsResolved.include.some((included) => { 155 | if (typeof included === 'string') { 156 | return included === id 157 | } 158 | 159 | return included.test(id) 160 | }) 161 | } 162 | 163 | return { 164 | build: { 165 | rollupOptions: { 166 | external: (id) => { 167 | if (isException(id)) { 168 | return false 169 | } 170 | 171 | if (isIncluded(id)) { 172 | return true 173 | } 174 | 175 | return depMatchers.some((depMatcher) => depMatcher.test(id)) 176 | }, 177 | }, 178 | }, 179 | } 180 | }, 181 | } 182 | } 183 | -------------------------------------------------------------------------------- /test/entry.ts: -------------------------------------------------------------------------------- 1 | import path from 'path' 2 | import path2 from 'node:path' 3 | import { resolve } from 'path' 4 | import chalk from 'chalk' 5 | import { defineConfig } from 'vite' 6 | // @ts-ignore 7 | import esbuild from 'esbuild' 8 | // @ts-ignore 9 | import rollup from 'rollup' 10 | // @ts-ignore 11 | import hello from 'unlisted-dep' 12 | 13 | console.log(path, path2, resolve, chalk, esbuild, defineConfig, rollup, hello) 14 | -------------------------------------------------------------------------------- /test/test.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "test", 3 | "packageManager": "pnpm@8.3.1", 4 | "dependencies": { 5 | "chalk": "^5.0.1" 6 | }, 7 | "devDependencies": { 8 | "vite": "^3.0.0" 9 | }, 10 | "optionalDependencies": { 11 | "esbuild": "^0.0.0" 12 | }, 13 | "peerDependencies": { 14 | "rollup": "^2.0.0" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /test/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { nodeResolve } from '@rollup/plugin-node-resolve' 2 | import { defineConfig } from 'vite' 3 | import { externalizeDeps } from '../dist' 4 | 5 | export default defineConfig({ 6 | build: { 7 | lib: { 8 | entry: './test/entry.ts', 9 | fileName: 'test', 10 | formats: ['es'], 11 | }, 12 | outDir: './test/dist', 13 | }, 14 | plugins: [ 15 | // We need nodeResolve to resolve dependencies of chalk. 16 | nodeResolve(), 17 | externalizeDeps({ 18 | devDeps: true, 19 | include: [ 20 | /^unlisted-dep(?:\/.*)?$/, 21 | ], 22 | useFile: './test/test.json', 23 | }), 24 | ], 25 | }) 26 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "alwaysStrict": true, 4 | "declaration": true, 5 | "emitDeclarationOnly": true, 6 | "esModuleInterop": true, 7 | "module": "ESNext", 8 | "moduleResolution": "Node", 9 | "noImplicitReturns": true, 10 | "noUnusedLocals": true, 11 | "noUnusedParameters": true, 12 | "outDir": "./dist", 13 | "resolveJsonModule": true, 14 | "skipLibCheck": true, 15 | "sourceMap": true, 16 | "strict": true, 17 | "target": "ESNext", 18 | "useDefineForClassFields": true 19 | }, 20 | "include": ["./src/**/*"] 21 | } 22 | -------------------------------------------------------------------------------- /vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import { externalizeDeps } from 'vite-plugin-externalize-deps' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | build: { 7 | lib: { 8 | entry: './src/index.ts', 9 | fileName: 'index', 10 | }, 11 | rollupOptions: { 12 | external: [/^node:.*$/], 13 | output: [ 14 | { 15 | esModule: true, 16 | exports: 'named', 17 | format: 'es', 18 | }, 19 | { 20 | exports: 'named', 21 | format: 'cjs', 22 | inlineDynamicImports: true, 23 | interop: 'auto', 24 | }, 25 | ], 26 | }, 27 | sourcemap: true, 28 | target: 'esnext', 29 | }, 30 | plugins: [ 31 | externalizeDeps(), 32 | ], 33 | }) 34 | --------------------------------------------------------------------------------