Skip to content

Commit 3ff94fa

Browse files
committed
build: fix default build script (ignore sfc-playground)
close #4153
1 parent 1034546 commit 3ff94fa

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

packages/sfc-playground/package.json

-7
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@
77
"build": "vite build",
88
"serve": "vite preview"
99
},
10-
"buildOptions": {
11-
"formats": [
12-
"global"
13-
],
14-
"env": "development",
15-
"enableNonBrowserBranches": true
16-
},
1710
"devDependencies": {
1811
"@types/codemirror": "^0.0.108",
1912
"@vitejs/plugin-vue": "^1.2.0",

scripts/build.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ async function build(target) {
7575
const pkgDir = path.resolve(`packages/${target}`)
7676
const pkg = require(`${pkgDir}/package.json`)
7777

78-
// only build published packages for release
79-
if (isRelease && pkg.private) {
78+
// if this is a full build (no specific targets), ignore private packages
79+
if ((isRelease || !targets.length) && pkg.private) {
8080
return
8181
}
8282

@@ -118,9 +118,8 @@ async function build(target) {
118118
const { Extractor, ExtractorConfig } = require('@microsoft/api-extractor')
119119

120120
const extractorConfigPath = path.resolve(pkgDir, `api-extractor.json`)
121-
const extractorConfig = ExtractorConfig.loadFileAndPrepare(
122-
extractorConfigPath
123-
)
121+
const extractorConfig =
122+
ExtractorConfig.loadFileAndPrepare(extractorConfigPath)
124123
const extractorResult = Extractor.invoke(extractorConfig, {
125124
localBuild: true,
126125
showVerboseMessages: true

0 commit comments

Comments
 (0)