From 90588534110b929eabadcd88d98e1e9ec8569f1f Mon Sep 17 00:00:00 2001 From: Evan You Date: Fri, 20 Oct 2023 11:25:27 +0800 Subject: [PATCH] chore: fix sfc-playground build @vitejs/plugin-vue 4.4 now relies on vue APIs, so we need to also build the CJS dist files from a fresh repo --- package.json | 4 ++-- scripts/build.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index de5f089c18..476a241fff 100644 --- a/package.json +++ b/package.json @@ -32,8 +32,8 @@ "dev-sfc-run": "run-p \"dev compiler-sfc -f esm-browser\" \"dev vue -if esm-bundler-runtime\" \"dev server-renderer -if esm-bundler\" dev-sfc-serve", "serve": "serve", "open": "open http://localhost:3000/packages/template-explorer/local.html", - "build-sfc-playground": "run-s build-compiler-cjs build-runtime-esm build-ssr-esm build-sfc-playground-self", - "build-compiler-cjs": "node scripts/build.js compiler reactivity-transform shared -af cjs", + "build-sfc-playground": "run-s build-all-cjs build-runtime-esm build-ssr-esm build-sfc-playground-self", + "build-all-cjs": "node scripts/build.js vue runtime compiler reactivity reactivity-transform shared -af cjs", "build-runtime-esm": "node scripts/build.js runtime reactivity shared -af esm-bundler && node scripts/build.js vue -f esm-bundler-runtime && node scripts/build.js vue -f esm-browser-runtime", "build-ssr-esm": "node scripts/build.js compiler-sfc server-renderer -f esm-browser", "build-sfc-playground-self": "cd packages/sfc-playground && npm run build", diff --git a/scripts/build.js b/scripts/build.js index 154ed5b2d5..77f711ce87 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -17,7 +17,7 @@ nr build core --formats cjs */ import fs from 'node:fs/promises' -import { existsSync, readFileSync } from 'node:fs' +import { existsSync } from 'node:fs' import path from 'node:path' import minimist from 'minimist' import { gzipSync, brotliCompressSync } from 'node:zlib' -- 2.47.3