-
-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
duplicate vue runtime loaded into the page
- Loading branch information
Showing
3 changed files
with
17 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { dirname, join } from 'pathe' | ||
import { fileURLToPath } from 'url' | ||
import { createRequire } from 'module' | ||
|
||
const __dirname = dirname(fileURLToPath(import.meta.url)) | ||
const require = createRequire(import.meta.url) | ||
|
||
const isInHistoireMonorepo = __dirname.includes(join('packages', 'histoire', 'dist')) | ||
|
||
export function getInjectedImport (request: string) { | ||
return JSON.stringify(isInHistoireMonorepo ? require.resolve(request) : request) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters