Skip to content

Commit

Permalink
test: fix import
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Oct 6, 2019
1 parent 82bd9eb commit c4f9b6d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/compiler-core/__tests__/codegen.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 4 additions & 2 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down

0 comments on commit c4f9b6d

Please sign in to comment.