]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
test: fix import
authorEvan You <yyx990803@gmail.com>
Sun, 6 Oct 2019 03:20:02 +0000 (23:20 -0400)
committerEvan You <yyx990803@gmail.com>
Sun, 6 Oct 2019 03:20:02 +0000 (23:20 -0400)
packages/compiler-core/__tests__/codegen.spec.ts
rollup.config.js
tsconfig.json

index 1b15b272b90a5d699b1ab2f9909ad6dad6834b1d..240c1949ea775e58eda30cdeed406edb6cab138e 100644 (file)
@@ -24,7 +24,7 @@ import {
   RESOLVE_COMPONENT
 } from '../src/runtimeHelpers'
 import { createElementWithCodegen } from './testUtils'
-import { PatchFlags } from 'vue'
+import { PatchFlags } from '@vue/shared'
 
 function createRoot(options: Partial<RootNode> = {}): RootNode {
   return {
index c94a7f9816ab5f1dec7ced05ddfe94b71994f14b..4937f618b2b112482299a187c397f9afbeae2097 100644 (file)
@@ -19,9 +19,11 @@ const packageOptions = pkg.buildOptions || {}
 // build aliases dynamically
 const aliasOptions = { resolve: ['.ts'] }
 fs.readdirSync(packagesDir).forEach(dir => {
+  if (dir === 'vue') {
+    return
+  }
   if (fs.statSync(path.resolve(packagesDir, dir)).isDirectory()) {
-    const name = dir === `vue` ? dir : `@vue/${dir}`
-    aliasOptions[name] = path.resolve(packagesDir, `${dir}/src/index`)
+    aliasOptions[`@vue/${dir}`] = path.resolve(packagesDir, `${dir}/src/index`)
   }
 })
 const aliasPlugin = alias(aliasOptions)
index b4b9e4bf85f7f997880e78a695a568dd87e0d6b6..3784a8e29d1809a48e14f3893e431d6f80570f19 100644 (file)
@@ -20,7 +20,6 @@
     "types": ["jest", "node"],
     "rootDir": ".",
     "paths": {
-      "vue": ["packages/vue/src"],
       "@vue/shared": ["packages/shared/src"],
       "@vue/runtime-core": ["packages/runtime-core/src"],
       "@vue/runtime-dom": ["packages/runtime-dom/src"],