Skip to content

Commit 44abecd

Browse files
committed
chore: update
1 parent 2e60935 commit 44abecd

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Diff for: src/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export interface Component {
77
filePath: string
88
shortPath: string
99
isAsync?: boolean
10-
isAbsolute?: boolean
10+
resolvePath?: boolean
1111
chunkName: string
1212
/** @deprecated */
1313
global: boolean

Diff for: templates/components/index.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
c.prefetch === true || typeof c.prefetch === 'number' ? `webpackPrefetch: ${c.prefetch}` : false,
55
c.preload === true || typeof c.preload === 'number' ? `webpackPreload: ${c.preload}` : false,
66
].filter(Boolean).join(', ')
7-
const filePath = c.isAbsolute ? c.filePath : `../${relativeToBuild(c.filePath)}`
7+
const filePath = (c.resolvePath === false || ['~', '@'].includes(c.filePath[0]))
8+
? c.filePath
9+
: `../${relativeToBuild(c.filePath)}`
810
if (c.isAsync === true || (!isDev /* prod fallback */ && c.isAsync === null)) {
911
const exp = c.export === 'default' ? `c.default || c` : `c['${c.export}']`
1012
const asyncImport = `() => import('${filePath}' /* ${magicComments} */).then(c => wrapFunctional(${exp}))`

0 commit comments

Comments
 (0)