File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
packages/create-vue-lib/src/template
playground/config/packages/playground
vitepress/config/packages/docs/.vitepress Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -21,11 +21,13 @@ export default defineConfig(({ mode }): UserConfig => ({
21
21
{
22
22
find: ' @' ,
23
23
replacement: ' @' ,
24
- customResolver (source , importer ) {
25
- return source .replace (
24
+ customResolver (source , importer , options ) {
25
+ const filePath = source .replace (
26
26
/ ^ @\/ / ,
27
27
importer? .startsWith (librarySrc) ? librarySrc : playgroundSrc
28
28
)
29
+
30
+ return this .resolve (filePath, importer, options)
29
31
}
30
32
}, {
31
33
find: ' <%- config.scopedPackageName %>' ,
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { defineConfigWithTheme } from 'vitepress'
4
4
5
5
<% _ if (config .includeAtAliases ) { _% >
6
6
const librarySrc = fileURLToPath (new URL (' ../../<%- config.mainPackageDirName %>/src/' , import .meta.url))
7
- const playgroundSrc = fileURLToPath (new URL (' ../src/' , import .meta.url))
7
+ const docsSrc = fileURLToPath (new URL (' ../src/' , import .meta.url))
8
8
< % _ } _% >
9
9
10
10
export default ({ mode }: { mode: string }) => defineConfigWithTheme ({
@@ -40,11 +40,13 @@ export default ({ mode }: { mode: string }) => defineConfigWithTheme({
40
40
{
41
41
find: ' @' ,
42
42
replacement: ' @' ,
43
- customResolver (source , importer ) {
44
- return source .replace (
43
+ customResolver (source , importer , options ) {
44
+ const filePath = source .replace (
45
45
/ ^ @\/ / ,
46
- importer? .startsWith (librarySrc) ? librarySrc : playgroundSrc
46
+ importer? .startsWith (librarySrc) ? librarySrc : docsSrc
47
47
)
48
+
49
+ return this .resolve (filePath, importer, options)
48
50
}
49
51
}, {
50
52
find: ' <%- config.scopedPackageName %>' ,
You can’t perform that action at this time.
0 commit comments