From 218e6e166784ce967244c68c9a25822ad2053e11 Mon Sep 17 00:00:00 2001 From: Evan You Date: Sun, 19 Apr 2020 18:42:07 -0400 Subject: [PATCH] build: adjust build formats - Rename `esm` to `esm-browser` - Add runtime-only build for `esm-browser` - Add default CDN alias for jsdelivr --- packages/compiler-dom/package.json | 5 +++-- packages/reactivity/package.json | 5 +++-- packages/runtime-dom/package.json | 4 ++-- packages/runtime-test/README.md | 4 ++++ packages/runtime-test/package.json | 6 ------ packages/vue/README.md | 29 ++++++++++++++++------------- packages/vue/package.json | 4 +++- rollup.config.js | 27 ++++++++++++++++----------- 8 files changed, 47 insertions(+), 37 deletions(-) diff --git a/packages/compiler-dom/package.json b/packages/compiler-dom/package.json index 615c506e..cce6b86b 100644 --- a/packages/compiler-dom/package.json +++ b/packages/compiler-dom/package.json @@ -6,6 +6,7 @@ "module": "dist/compiler-dom.esm-bundler.js", "types": "dist/compiler-dom.d.ts", "unpkg": "dist/compiler-dom/global.js", + "jsdelivr": "dist/compiler-dom/global.js", "files": [ "index.js", "dist" @@ -15,9 +16,9 @@ "name": "VueCompilerDOM", "formats": [ "esm-bundler", + "esm-browser", "cjs", - "global", - "esm" + "global" ] }, "repository": { diff --git a/packages/reactivity/package.json b/packages/reactivity/package.json index 4e3ca165..6a33fed6 100644 --- a/packages/reactivity/package.json +++ b/packages/reactivity/package.json @@ -6,6 +6,7 @@ "module": "dist/reactivity.esm-bundler.js", "types": "dist/reactivity.d.ts", "unpkg": "dist/reactivity.global.js", + "jsdelivr": "dist/reactivity.global.js", "files": [ "index.js", "dist" @@ -19,9 +20,9 @@ "name": "VueReactivity", "formats": [ "esm-bundler", + "esm-browser", "cjs", - "global", - "esm" + "global" ] }, "keywords": [ diff --git a/packages/runtime-dom/package.json b/packages/runtime-dom/package.json index 477cbf2b..8b9a0e20 100644 --- a/packages/runtime-dom/package.json +++ b/packages/runtime-dom/package.json @@ -15,9 +15,9 @@ "name": "VueRuntimeDOM", "formats": [ "esm-bundler", + "esm-browser", "cjs", - "global", - "esm" + "global" ], "dts": [ "jsx.d.ts" diff --git a/packages/runtime-test/README.md b/packages/runtime-test/README.md index 66cbb62d..6d6ba829 100644 --- a/packages/runtime-test/README.md +++ b/packages/runtime-test/README.md @@ -1,5 +1,9 @@ # @vue/runtime-test +This is for Vue's own internal tests only - it ensures logic tested using this package is DOM-agnostic, and it runs faster than JSDOM. + +It can also be used as a reference for implementing a custom renderer. + ``` js import { h, render, nodeOps, dumpOps } from '@vue/runtime-test' diff --git a/packages/runtime-test/package.json b/packages/runtime-test/package.json index 082a662a..df69ceb6 100644 --- a/packages/runtime-test/package.json +++ b/packages/runtime-test/package.json @@ -14,12 +14,6 @@ "type": "git", "url": "git+https://github.com/vuejs/vue-next.git" }, - "buildOptions": { - "name": "VueRuntimeTest", - "formats": [ - "global" - ] - }, "keywords": [ "vue" ], diff --git a/packages/vue/README.md b/packages/vue/README.md index d2911f7d..e37aad3e 100644 --- a/packages/vue/README.md +++ b/packages/vue/README.md @@ -6,27 +6,30 @@ - **`vue(.runtime).global(.prod).js`**: - For direct use via `