]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
build: fix mutli format build script
authorEvan You <evan@vuejs.org>
Tue, 10 Dec 2024 00:21:18 +0000 (08:21 +0800)
committerEvan You <evan@vuejs.org>
Tue, 10 Dec 2024 00:21:18 +0000 (08:21 +0800)
rollup.config.js
scripts/build.js

index a3e87dc35772dc7f7a52d8047f90de29d57319dc..cc71782bf3030c080e851df4ae4f6a81cf28dc31 100644 (file)
@@ -98,7 +98,7 @@ const outputConfigs = {
 const defaultFormats = ['esm-bundler', 'cjs']
 /** @type {ReadonlyArray<PackageFormat>} */
 const inlineFormats = /** @type {any} */ (
-  process.env.FORMATS && process.env.FORMATS.split(',')
+  process.env.FORMATS && process.env.FORMATS.split('+')
 )
 /** @type {ReadonlyArray<PackageFormat>} */
 const packageFormats = inlineFormats || packageOptions.formats || defaultFormats
index 4a0aef645438ce227edfacf7bb05b177d01b0a63..7af93db4043203f4aebbb81be98794c49625606f 100644 (file)
@@ -5,14 +5,17 @@ Produces production builds and stitches together d.ts files.
 
 To specify the package to build, simply pass its name and the desired build
 formats to output (defaults to `buildOptions.formats` specified in that package,
-or "esm,cjs"):
+or ["esm-bundler", "cjs"]):
 
 ```
 # name supports fuzzy match. will build all packages with name containing "dom":
 nr build dom
 
 # specify the format to output
-nr build core --formats cjs
+nr build vue -f cjs
+
+# to specify multiple formats, separate with "+":
+nr build vue -f esm-bundler+esm-browser
 ```
 */