denoland / denoland/examples

Manage dependencies using `deps.ts` in vue example

Open
#24 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
114
Forks
37
PR merge metrics
No merged PRs in 30d

Description

Hi,

Normally deno look into `deps.ts` for dependencies, however we still need to manually set the reference of dependencies with the exact version (semver). I'm not using [trex](https://github.com/crewdevio/Trex) neither any other similar tool, because I believe this is the recommended way to manage `[dev_]deps.ts`?

Here is the `deps.ts` file:
```ts
export { defineConfig } from 'npm:vite@^4.3.9'
export { Application, Router } from "https://deno.land/x/oak/mod.ts"
export { oakCors } from "https://deno.land/x/cors/mod.ts"

// I tried all these combinations but none of them work:
// export * from 'npm:@vitejs/plugin-vue@^4.2.3'
// export { vue } from 'npm:@vitejs/plugin-vue@^4.2.3'
// export * from 'npm:vue@^3.3.4'
// export { vue } from 'npm:vue@^3.3.4'
// export { createRouter, createWebHistory } from 'npm:vue-router@4'
```

At the moment all referenced dependencies work fine except those in comments, so -AFAIK- referencing `defineConfig` in `vite.config.mts` should be done like so:
```ts
import { defineConfig } from 'deps.ts';
```
but It didn't work either, we must use `import { defineConfig } from 'npm:vite@^4.3.9'`, any explanation for this behavior?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.