← 返回命令列表

Linux command

vue-build 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Build for production

vue build

Build with custom target

vue build --target [lib]

Build specific entry

vue build [entry.js]

说明

vue build compiles Vue.js applications for production. Creates optimized bundles with minification and tree-shaking. Part of Vue CLI's instant prototyping feature (requires `@vue/cli-service-global`). For standard project builds, use `vue-cli-service build`.

参数

--target _target_
Build target (app, lib, wc).
--name _name_
Library or component name.
--dest _dir_
Output directory.
--modern
Build for modern browsers with auto legacy fallback (Vue CLI 4 only, removed in CLI 5).
--no-clean
Do not remove the output directory before building.
--watch
Watch for changes and rebuild automatically.

FAQ

What is the vue-build command used for?

vue build compiles Vue.js applications for production. Creates optimized bundles with minification and tree-shaking. Part of Vue CLI's instant prototyping feature (requires `@vue/cli-service-global`). For standard project builds, use `vue-cli-service build`.

How do I run a basic vue-build example?

Run `vue build` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --target _target_ do in vue-build?

Build target (app, lib, wc).