Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manage dependencies using deps.ts in vue example #24

Open
bitsnaps opened this issue Nov 7, 2023 · 1 comment
Open

Manage dependencies using deps.ts in vue example #24

bitsnaps opened this issue Nov 7, 2023 · 1 comment

Comments

@bitsnaps
Copy link

bitsnaps commented Nov 7, 2023

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 neither any other similar tool, because I believe this is the recommended way to manage [dev_]deps.ts?

Here is the deps.ts file:

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:

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?

@bitsnaps
Copy link
Author

bitsnaps commented Aug 6, 2024

Here is a related issue with Pinia, where it's flagged as a node compatibility issue, although the creator of Pinia confirms he does not use any specific Node.js API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant