workflow: add size-check package

This commit is contained in:
Evan You 2019-12-10 11:31:57 -05:00
parent c97d83aff2
commit b198a665cf
4 changed files with 17 additions and 1 deletions

View File

@ -6,7 +6,7 @@
"scripts": {
"dev": "node scripts/dev.js",
"build": "node scripts/build.js",
"size-runtime": "node scripts/build.js runtime-dom -p -f global",
"size-runtime": "node scripts/build.js runtime-dom size-check -p -f global",
"size-compiler": "node scripts/build.js compiler-dom -p -f global",
"size": "yarn size-runtime && yarn size-compiler",
"lint": "prettier --write --parser typescript \"packages/**/*.ts?(x)\"",

View File

@ -0,0 +1,3 @@
# Size Check
This package is private and is used for checking the baseline runtime size after tree-shaking (with only the bare minimal code required to render something to the screen).

View File

@ -0,0 +1,9 @@
{
"name": "@vue/size-check",
"version": "3.0.0-alpha.1",
"private": true,
"buildOptions": {
"name": "Vue",
"formats": ["global"]
}
}

View File

@ -0,0 +1,4 @@
import { render, createVNode } from '@vue/runtime-dom'
// The bare minimum code required for rendering something to the screen
render(createVNode('div'), document.getElementById('app')!)