-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Open
Labels
topic/packagestype/proposalThe new feature has not been accepted yet but needs to be discussed first.The new feature has not been accepted yet but needs to be discussed first.
Description
Feature Description
In npm ecosystem, browser is able to access npm package inner resource.
Thus, I think, it would be nice to let browser able to access gitea npm package inner resource.
import Module from "https://esm.sh/PKG@SEMVER[/PATH]";
unpkg.com/:package@:version/:file
https://cdn.jsdelivr.net/npm/package@version/file
https://docs.gitea.com/usage/packages/npm
Below feature seems missing in gitea
https://gitea/user/-/packages/npm/hello/1.0.0/asset/dist/index.mjs
And the url should be importmap friendly
https://github.com/WICG/import-maps
With importmap versionize
"scopes": {
"user-url-scope": {
"hello/": "https://gitea/user/-/packages/npm/hello/1.0.0/asset/",
Code
import {hello} from "hello/dist/index.mjs"
Equivalent
import {hello} from "https://gitea/user/-/packages/npm/hello/1.0.0/asset/dist/index.mjs"
Screenshots
No response
Metadata
Metadata
Assignees
Labels
topic/packagestype/proposalThe new feature has not been accepted yet but needs to be discussed first.The new feature has not been accepted yet but needs to be discussed first.