test: fix import
This commit is contained in:
parent
82bd9eb1db
commit
c4f9b6d592
@ -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 {
|
||||
|
@ -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)
|
||||
|
@ -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"],
|
||||
|
Loading…
Reference in New Issue
Block a user