Skip to content

itsdouges/vite_plugin_deno_resolve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vite_plugin_deno_resolve

This plugin enables Vite to resolve modules using Deno, the easiest, most secure JavaScript runtime.

See: Deno feature highlights.

Requirements

  • Deno v1.29.1 or higher.
  • Vite v3.2.4 or higher.

Install

Import the plugin to your Vite config and pass it to the plugins array.

import { defineConfig } from 'npm:vite@3.2.4';
import denoResolve from 'https://deno.land/x/vite_plugin_deno_resolve/mod.ts';

export default defineConfig({
  plugins: [denoResolve()],
});

Using VSCode? Make sure to install the Deno extension and set deno.enable in your VSCode workspace settings.

You're all set! Now when running Vite all dependencies will be resolved by Deno and if missing, cached locally.

Local development

deno task url # Start url example
deno task npm # Start npm example