[Metro > Common] Add moment to common modules
This commit is contained in:
parent
eb90b0a21d
commit
9080769a0c
3 changed files with 7 additions and 1 deletions
|
@ -21,6 +21,7 @@
|
|||
"esbuild-plugin-alias": "^0.2.1",
|
||||
"esbuild-plugin-external-global": "^1.0.1",
|
||||
"esbuild-plugin-replace": "^1.3.0",
|
||||
"moment": "2.22.2",
|
||||
"typescript": "^4.9.5"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
2
src/def.d.ts
vendored
2
src/def.d.ts
vendored
|
@ -2,6 +2,7 @@ import * as _spitroast from "spitroast";
|
|||
import _React from "react";
|
||||
import _RN from "react-native";
|
||||
import _Clipboard from "@react-native-clipboard/clipboard";
|
||||
import _moment from "moment";
|
||||
|
||||
type MetroModules = { [id: number]: any };
|
||||
|
||||
|
@ -301,6 +302,7 @@ interface VendettaObject {
|
|||
FluxDispatcher: PropIntellisense<"_currentDispatchActionType">;
|
||||
React: typeof _React;
|
||||
ReactNative: typeof _RN;
|
||||
moment: typeof _moment;
|
||||
};
|
||||
};
|
||||
constants: {
|
||||
|
|
|
@ -21,4 +21,7 @@ export const FluxDispatcher = findByProps("_currentDispatchActionType");
|
|||
|
||||
// React
|
||||
export const React = window.React as typeof import("react");
|
||||
export { ReactNative } from "@metro/hoist";
|
||||
export { ReactNative } from "@metro/hoist";
|
||||
|
||||
// Moment
|
||||
export { moment } from "@metro/hoist";
|
Loading…
Reference in a new issue