Skip to content

Commit

Permalink
chore: improve packaging (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinhagemeister authored Sep 27, 2024
1 parent 39f3689 commit b9de2fa
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# Deno vite plugin

Plugin to enable Deno resolution inside [vite](https://github.com/vitejs/vite).
It supports:

- Alias mappings in `deno.json`
- `npm:` specifier
- `jsr:` specifier
- `http:` and `https:` specifiers

## Limitations

Deno specific resolution cannot be used in `vite.config.ts` because it's not
possible to intercept the bundling process of the config file in vite.

## Usage

Expand Down
9 changes: 9 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@
"files": [
"dist/"
],
"keywords": [
"deno",
"vite",
"plugin"
],
"repository": {
"type": "git",
"url": "git+https://github.com/denoland/deno-vite-plugin.git"
},
"scripts": {
"test": "vitest",
"build": "rimraf dist/ && tsc",
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import prefixPlugin from "./prefixPlugin.js";
import mainPlugin from "./resolvePlugin.js";
import { DenoResolveResult } from "./resolver.js";

export default function denoPlugin(): Plugin[] {
export default function deno(): Plugin[] {
const cache = new Map<string, DenoResolveResult>();

return [prefixPlugin(cache), mainPlugin(cache)];
Expand Down

0 comments on commit b9de2fa

Please sign in to comment.