-
Notifications
You must be signed in to change notification settings - Fork 170
Expand file tree
/
Copy pathsnap.txt
More file actions
75 lines (66 loc) · 3.43 KB
/
snap.txt
File metadata and controls
75 lines (66 loc) · 3.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
> vp pack -h # should print the help message
vp pack
Usage:
$ vp pack [...files]
Commands:
[...files] Bundle files
For more info, run any command with the `--help` flag:
$ vp pack --help
Options:
--config-loader <loader> Config loader to use: auto, native, unrun (default: auto)
--no-config Disable config file (default: true)
-f, --format <format> Bundle format: esm, cjs, iife, umd (default: esm)
--clean Clean output directory, --no-clean to disable
--deps.never-bundle <module> Mark dependencies as external
--minify Minify output
--devtools Enable devtools integration
--debug [feat] Show debug logs
--target <target> Bundle target, e.g "es2015", "esnext"
-l, --logLevel <level> Set log level: info, warn, error, silent
--fail-on-warn Fail on warnings (default: true)
--no-write Disable writing files to disk, incompatible with watch mode (default: true)
-d, --out-dir <dir> Output directory (default: dist)
--treeshake Tree-shake bundle (default: true)
--sourcemap Generate source map (default: false)
--shims Enable cjs and esm shims (default: false)
--platform <platform> Target platform (default: node)
--dts Generate dts files
--publint Enable publint (default: false)
--attw Enable Are the types wrong integration (default: false)
--unused Enable unused dependencies check (default: false)
-w, --watch [path] Watch mode
--ignore-watch <path> Ignore custom paths in watch mode
--from-vite [vitest] Reuse config from Vite or Vitest
--report Size report (default: true)
--env.* <value> Define compile-time env variables
--env-file <file> Load environment variables from a file, when used together with --env, variables in --env take precedence
--env-prefix <prefix> Prefix for env variables to inject into the bundle (default: VITE_PACK_,TSDOWN_)
--on-success <command> Command to run on success
--copy <dir> Copy files to output dir
--public-dir <dir> Alias for --copy, deprecated
--tsconfig <tsconfig> Set tsconfig path
--unbundle Unbundle mode
--root <dir> Root directory of input files
--exe Bundle as executable
-W, --workspace [dir] Enable workspace mode
-F, --filter <pattern> Filter configs (cwd or name), e.g. /pkg-name$/ or pkg-name
--exports Generate export-related metadata for package.json (experimental)
-h, --help Display this message
> vp run pack # should build the library
$ vp pack src/index.ts
ℹ entry: src/index.ts
ℹ Build start
ℹ dist/index.mjs <variable> kB │ gzip: <variable> kB
ℹ 1 files, total: <variable> kB
✔ Build complete in <variable>ms
> ls dist # should have the library
index.mjs
> vp run pack # should hit cache
$ vp pack src/index.ts ◉ cache hit, replaying
ℹ entry: src/index.ts
ℹ Build start
ℹ dist/index.mjs <variable> kB │ gzip: <variable> kB
ℹ 1 files, total: <variable> kB
✔ Build complete in <variable>ms
---
vp run: cache hit, <variable>ms saved.