GitHub image
snowpack
⌘K
Exports
Readme
Classes
1
NotFoundError
Docs
Import
Tests
3
References
2

A helper class for "Not Found" errors, storing data about what file lookups were attempted.

class NotFoundError {
constructor(url: string, lookups?: string[]): NotFoundError
}
Functions
12
getUrlForFile
Docs
Import
Tests
3
References
2
function getUrlForFile(fileLoc: string, config: SnowpackConfig): string
preparePackages
Docs
Import
Tests
3
References
2
function preparePackages(_: CommandOptions): Promise<void>
startDevServer
Docs
Import
Tests
3
References
2
function startDevServer(): void
buildProject
Docs
Import
Tests
3
References
2
function buildProject(): void
loadAndValidateConfig
Docs
Import
Tests
3
References
2
function loadAndValidateConfig(): void
cli
Docs
Import
Tests
3
References
2
function cli(args: string[]): Promise<never>
startServer
Docs
Import
Tests
3
References
2
function startServer(
commandOptions: CommandOptions,
_?: { isDev?: boolean, isWatch?: boolean, preparePackages?: boolean }
): Promise<SnowpackDevServer>
build
Docs
Import
Tests
3
References
2
function build(commandOptions: CommandOptions): Promise<SnowpackBuildResult>
loadConfiguration
Docs
Import
Tests
3
References
2
function loadConfiguration(
overrides?: SnowpackUserConfig,
configPath?: string
): Promise<SnowpackConfig>
createConfiguration
Docs
Import
Tests
3
References
2
function createConfiguration(config?: SnowpackUserConfig): SnowpackConfig
loadLockfile
Docs
Import
Tests
3
References
2
function loadLockfile(cwd: string): Promise<LockfileManifest>
clearCache
Docs
Import
Tests
3
References
2
function clearCache(): Promise<[void, void, void]>
Class Instances
1
logger
Docs
Import
Tests
3
References
2
const logger: SnowpackLogger
Interfaces
5
RawSourceMap
Docs
Import
Tests
3
References
2
interface RawSourceMap {
version: number
sources: string[]
names: string[]
sourceRoot?: string
sourcesContent?: string[]
mappings: string
file: string
}
ServerRuntimeConfig
Docs
Import
Tests
3
References
2
interface ServerRuntimeConfig {
load: (url: string) => Promise<LoadResult<string>>
}
ServerRuntime
Docs
Import
Tests
3
References
2
interface ServerRuntime {
importModule: <T'>(url: string) => Promise<ServerRuntimeModule<T'>>
invalidateModule: (url: string) => void
}
ServerRuntimeModule
Docs
Import
Tests
3
References
2
interface ServerRuntimeModule<T'> {
exports: T'
css: string[]
}
LoadResult
Docs
Import
Tests
3
References
2
interface LoadResult<T' = any> {
contents: T'
imports: any[]
originalFileLoc: string
contentType: string | false
checkStale?: () => Promise<void>
}
Type Aliases
1
DeepPartial
Docs
Import
Tests
3
References
2
type DeepPartial<T'> = { }
Description
The ESM-powered frontend build tool. Fast, lightweight, unbundled.
Install
yarn add snowpack
Copy
Details
MIT License
52 Dependencies
Includes CLI
Native TypeScript Package
Metrics
Weekly Downloads