ITADN

Manage dependencies using `deps.ts` in vue example

#24Openbitsnaps 创建于 2023-11-07
B
bitsnapscommented
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?
1 条评论