Support adding scoped packages via snowpack cli #2532
ReidBraswell
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
this also happens with @fluentui/react, etc.... I tried to change just that line into: let [pkgName, pkgSemver] = addValue.indexOf('@') <= 0 ? [addValue, ''] : addValue.split('@'); But the error become even stranger, and I give up. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I tried adding a package via
snowpack add
; however, this package is under a npm scope:@reach/dialog
. I looked at theadd
command in thesnowpack/src/commands
directory, and it appears theaddCommand
function splits the command line argument for the package name based on@
to get the name and the version.https://github.com/snowpackjs/snowpack/blob/41c29f25e53695ec84c07386af7eb140d0b22a8e/snowpack/src/commands/add-rm.ts#L20
This works great for non-scoped packages; however, for packages published under a npm scope, i.e.
@reach/dialog
this will fail.Beta Was this translation helpful? Give feedback.
All reactions