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 => ({
2121 {
2222 find: ' @' ,
2323 replacement: ' @' ,
24- customResolver (source , importer ) {
25- return source .replace (
24+ customResolver (source , importer , options ) {
25+ const filePath = source .replace (
2626 / ^ @\/ / ,
2727 importer? .startsWith (librarySrc) ? librarySrc : playgroundSrc
2828 )
29+
30+ return this .resolve (filePath, importer, options)
2931 }
3032 }, {
3133 find: ' <%- config.scopedPackageName %>' ,
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { defineConfigWithTheme } from 'vitepress'
44
55<% _ if (config .includeAtAliases ) { _% >
66const 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))
88< % _ } _% >
99
1010export default ({ mode }: { mode: string }) => defineConfigWithTheme ({
@@ -40,11 +40,13 @@ export default ({ mode }: { mode: string }) => defineConfigWithTheme({
4040 {
4141 find: ' @' ,
4242 replacement: ' @' ,
43- customResolver (source , importer ) {
44- return source .replace (
43+ customResolver (source , importer , options ) {
44+ const filePath = source .replace (
4545 / ^ @\/ / ,
46- importer? .startsWith (librarySrc) ? librarySrc : playgroundSrc
46+ importer? .startsWith (librarySrc) ? librarySrc : docsSrc
4747 )
48+
49+ return this .resolve (filePath, importer, options)
4850 }
4951 }, {
5052 find: ' <%- config.scopedPackageName %>' ,
You can’t perform that action at this time.
0 commit comments