Repository: vuejs/vue
Pull request: build: map vue to local types, simplify build setup

**What kind of change does this PR introduce?** (check at least one)

- [ ] Bugfix
- [ ] Feature
- [ ] Code style update
- [ ] Refactor
- [x] Build-related changes
- [ ] Other, please describe:

**Does this PR introduce a breaking change?** (check one)

- [ ] Yes
- [x] No

If yes, please describe the impact and migration path for existing applications:

**The PR fulfills these requirements:**

- [x] It's submitted to the `dev` branch for v2.x (or to a previous version branch), _not_ the `master` branch
- [ ] When resolving a specific issue, it's referenced in the PR's title (e.g. `fix #xxx[,#xxx]`, where "xxx" is the issue number)
- [x] All tests are passing: https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#development-setup
- [ ] New/updated tests are included

If adding a **new feature**, the PR's description includes:
- [ ] A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

**Other information:**


Changed files:
filename: .circleci/config.yml
patch: @@ -16,7 +16,6 @@ jobs:
             - v1-vue-{{ .Branch }}-
             - v1-vue-
       - run: npm install
-      - run: cd packages/vue-server-renderer && npm install vue
       - save_cache:
           key: v1-vue-{{ .Branch }}-{{ checksum "package-lock.json" }}
           paths:

filename: build/setup.js
patch: @@ -1,7 +1,4 @@
-const { test, ln, chmod, cd, exec } = require('shelljs')
-const path = require('path')
-
-const baseUrl = path.resolve()
+const { test, ln, chmod } = require('shelljs')
 
 function installHooks () {
   if (test('-e', '.git/hooks')) {
@@ -12,15 +9,4 @@ function installHooks () {
   }
 }
 
-function setupSSR () {
-  const ssrBase = path.resolve('packages/vue-server-renderer')
-  if (!test('-e', path.join(ssrBase, 'node_modules'))) {
-    cd(ssrBase)
-    exec('npm install')
-    cd(baseUrl)
-  }
-}
-
 installHooks()
-setupSSR()
-

filename: dist/vue.runtime.common.js
patch: @@ -3777,8 +3777,8 @@ function renderStatic (
 ) {
   // static trees can be rendered once and cached on the contructor options
   // so every instance shares the same cached trees
-  var renderFns = this.$options.staticRenderFns;
-  var cached = renderFns.cached || (renderFns.cached = []);
+  var options = this.$options;
+  var cached = options.cached || (options.cached = []);
   var tree = cached[index];
   // if has already-rendered static tree and not inside v-for,
   // we can reuse the same tree by doing a shallow clone.
@@ -3788,7 +3788,7 @@ function renderStatic (
       : cloneVNode(tree)
   }
   // otherwise, render a fresh tree.
-  tree = cached[index] = renderFns[index].call(this._renderProxy, null, this);
+  tree = cached[index] = options.staticRenderFns[index].call(this._renderProxy, null, this);
   markStatic(tree, ("__static__" + index), false);
   return tree
 }

filename: types/test/tsconfig.json
patch: @@ -7,7 +7,11 @@
     ],
     "module": "commonjs",
     "strict": true,
-    "noEmit": true
+    "noEmit": true,
+    "baseUrl": ".",
+    "paths": {
+      "vue": ["../index.d.ts"]
+    }
   },
   "files": [
     "../index.d.ts",