diff --git a/rollup.config.js b/rollup.config.js index a3e87dc35..cc71782bf 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -98,7 +98,7 @@ const outputConfigs = { const defaultFormats = ['esm-bundler', 'cjs'] /** @type {ReadonlyArray} */ const inlineFormats = /** @type {any} */ ( - process.env.FORMATS && process.env.FORMATS.split(',') + process.env.FORMATS && process.env.FORMATS.split('+') ) /** @type {ReadonlyArray} */ const packageFormats = inlineFormats || packageOptions.formats || defaultFormats diff --git a/scripts/build.js b/scripts/build.js index 4a0aef645..7af93db40 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -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 ``` */