forked from micromatch/to-regex-range
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
210 additions
and
172 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
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
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
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
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,36 @@ | ||
/** | ||
* C10n Cloudflare sockets plugin. | ||
* | ||
* Vite is not aware of this config file's location. | ||
* | ||
* @note PLEASE DO NOT EDIT THIS FILE! | ||
* @note This entire file will be updated automatically. | ||
* @note Instead of editing here, please review <https://github.com/clevercanyon/skeleton>. | ||
*/ | ||
|
||
/** | ||
* Configures Cloudflare sockets plugin for Vite. | ||
* | ||
* @param props Props from vite config file driver. | ||
* | ||
* @returns Plugin configuration. | ||
*/ | ||
export default async ({ mode, command }) => { | ||
const virtualId = 'cloudflare:sockets'; | ||
const resolvedVirtualId = '\0' + virtualId; | ||
|
||
return { | ||
name: 'vite-plugin-c10n-cloudflare-sockets', | ||
|
||
resolveId(id) { | ||
if ('dev' === mode && 'serve' === command && id === virtualId) { | ||
return '\0' + id; | ||
} | ||
}, | ||
async load(id) { | ||
if ('dev' === mode && 'serve' === command && id === resolvedVirtualId) { | ||
return 'export default {};'; | ||
} | ||
}, | ||
}; | ||
}; |
Oops, something went wrong.