Przeglądaj źródła

test: fix import

Evan You 6 lat temu
rodzic
commit
c4f9b6d592

+ 1 - 1
packages/compiler-core/__tests__/codegen.spec.ts

@@ -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 {

+ 4 - 2
rollup.config.js

@@ -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)

+ 0 - 1
tsconfig.json

@@ -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"],