test: fix import
This commit is contained in:
parent
82bd9eb1db
commit
c4f9b6d592
@ -24,7 +24,7 @@ import {
|
|||||||
RESOLVE_COMPONENT
|
RESOLVE_COMPONENT
|
||||||
} from '../src/runtimeHelpers'
|
} from '../src/runtimeHelpers'
|
||||||
import { createElementWithCodegen } from './testUtils'
|
import { createElementWithCodegen } from './testUtils'
|
||||||
import { PatchFlags } from 'vue'
|
import { PatchFlags } from '@vue/shared'
|
||||||
|
|
||||||
function createRoot(options: Partial<RootNode> = {}): RootNode {
|
function createRoot(options: Partial<RootNode> = {}): RootNode {
|
||||||
return {
|
return {
|
||||||
|
@ -19,9 +19,11 @@ const packageOptions = pkg.buildOptions || {}
|
|||||||
// build aliases dynamically
|
// build aliases dynamically
|
||||||
const aliasOptions = { resolve: ['.ts'] }
|
const aliasOptions = { resolve: ['.ts'] }
|
||||||
fs.readdirSync(packagesDir).forEach(dir => {
|
fs.readdirSync(packagesDir).forEach(dir => {
|
||||||
|
if (dir === 'vue') {
|
||||||
|
return
|
||||||
|
}
|
||||||
if (fs.statSync(path.resolve(packagesDir, dir)).isDirectory()) {
|
if (fs.statSync(path.resolve(packagesDir, dir)).isDirectory()) {
|
||||||
const name = dir === `vue` ? dir : `@vue/${dir}`
|
aliasOptions[`@vue/${dir}`] = path.resolve(packagesDir, `${dir}/src/index`)
|
||||||
aliasOptions[name] = path.resolve(packagesDir, `${dir}/src/index`)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const aliasPlugin = alias(aliasOptions)
|
const aliasPlugin = alias(aliasOptions)
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
"types": ["jest", "node"],
|
"types": ["jest", "node"],
|
||||||
"rootDir": ".",
|
"rootDir": ".",
|
||||||
"paths": {
|
"paths": {
|
||||||
"vue": ["packages/vue/src"],
|
|
||||||
"@vue/shared": ["packages/shared/src"],
|
"@vue/shared": ["packages/shared/src"],
|
||||||
"@vue/runtime-core": ["packages/runtime-core/src"],
|
"@vue/runtime-core": ["packages/runtime-core/src"],
|
||||||
"@vue/runtime-dom": ["packages/runtime-dom/src"],
|
"@vue/runtime-dom": ["packages/runtime-dom/src"],
|
||||||
|
Loading…
Reference in New Issue
Block a user