|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
467 bytes
|
| Line | |
|---|
| 1 | /**
|
|---|
| 2 | Let a globally installed package use a locally installed version of itself if available.
|
|---|
| 3 |
|
|---|
| 4 | @param filePath - The absolute file path to the main file of the package.
|
|---|
| 5 |
|
|---|
| 6 | @example
|
|---|
| 7 | ```
|
|---|
| 8 | import importLocal from 'import-local';
|
|---|
| 9 |
|
|---|
| 10 | if (importLocal(import.meta.url)) {
|
|---|
| 11 | console.log('Using local version of this package');
|
|---|
| 12 | } else {
|
|---|
| 13 | // Code for both global and local version here…
|
|---|
| 14 | }
|
|---|
| 15 | ```
|
|---|
| 16 | */
|
|---|
| 17 | export default function importLocal(filePath: string): boolean | undefined | unknown;
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.