Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI

on:
pull_request:
push:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: 8.15.9

- uses: actions/setup-node@v4
with:
cache: pnpm
node-version: 20

- run: pnpm install --frozen-lockfile
- run: pnpm test
- run: pnpm build

compatibility:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: 8.15.9

- uses: actions/setup-node@v4
with:
cache: pnpm
node-version: 20

- run: pnpm install --frozen-lockfile
- run: pnpm build
- run: pnpm test:matrix
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ export default defineConfig({
})
```

The plugin externalizes matching imports during build resolution, so it can be used alongside your own `build.rollupOptions.external` entries.

This repo verifies compatibility across Vite 2 through 8 with the `pnpm test:matrix` suite.

### Configuration

Pass an object to `externalizeDeps` to override the default configuration.
Expand All @@ -41,6 +45,7 @@ externalizeDeps({
deps: true,
devDeps: false,
except: [],
include: [],
nodeBuiltins: true,
optionalDeps: true,
peerDeps: true,
Expand Down
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,18 @@
},
"scripts": {
"build": "vite build && tsc",
"test": "vite build -c test/vite.config.ts"
"test": "vitest run",
"test:matrix": "node ./test/compatibility-matrix.mjs"
},
"packageManager": "pnpm@8.15.9+sha512.499434c9d8fdd1a2794ebf4552b3b25c0a633abcee5bb15e7b5de90f32f47b513aca98cd5cfd001c31f0db454bc3804edccd578501e4ca293a6816166bbd9f81",
"devDependencies": {
"@rollup/plugin-node-resolve": "^16.0.1",
"@types/node": "^22.16.0",
"typescript": "^5.8.3",
"vite": "^7.0.3",
"vite-plugin-externalize-deps": "^0.9.0",
"vite-plugin-inspect": "^11.3.0"
"vite": "^8.0.2",
"vitest": "^4.1.0"
},
"peerDependencies": {
"vite": "^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0"
"vite": "^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0"
},
"publishConfig": {
"access": "public"
Expand Down
Loading