-
Notifications
You must be signed in to change notification settings - Fork 922
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
add import map support #1545
add import map support #1545
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/pikapkg/snowpack/p37wo4upv |
a0ef1c9
to
2d88d99
Compare
2d88d99
to
c89d8a6
Compare
c89d8a6
to
b9e934f
Compare
@@ -196,7 +196,10 @@ export async function lookupBySpecifier( | |||
(semverString ? `@${semverString}` : ``) + | |||
(packagePath ? `/${packagePath}` : ``); | |||
try { | |||
const {body, headers, isCached, isStale} = await fetchCDN(lookupUrl, userAgent); | |||
const {body, statusCode, headers, isCached, isStale} = await fetchCDN(lookupUrl, userAgent); | |||
if (statusCode !== 200) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any other situation where we‘d return another 2xx
code? (or 3xx
?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great call, we do only return 200s in this case, but this is one place where the ?meta
param will really help
@@ -81,10 +81,6 @@ const configSchema = { | |||
install: {type: 'array', items: {type: 'string'}}, | |||
exclude: {type: 'array', items: {type: 'string'}}, | |||
plugins: {type: 'array'}, | |||
webDependencies: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
import {ImportMap, SnowpackConfig} from './types/snowpack'; | ||
|
||
import type {HttpieResponse} from 'httpie'; | ||
|
||
export const PIKA_CDN = `https://cdn.pika.dev`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 🎉
I love this! Not as a part of this PR, but yeah would love to get some docs in for this, linking to the official import map proposal and all. Always exciting to introduce people to more emerging standards through a tool they commonly use |
b9e934f
to
023606f
Compare
Changes
snowpack.lock.json
file!add
&rm
CLI commands to help you generate & manage your lockfile more easily (powered by Skypack CDN).Testing
add
,rm
, and lockfile tests all TODODocs
Future PR