diff --git a/packages/xarc-create-app/template/src/import-assets.d.ts b/packages/xarc-create-app/template/src/import-assets.d.ts new file mode 100644 index 000000000..7d1f2ebf8 --- /dev/null +++ b/packages/xarc-create-app/template/src/import-assets.d.ts @@ -0,0 +1,5 @@ +// custom typing for import assets +declare module "*.png" { + const value: any; + export default value; +} diff --git a/packages/xarc-react/package.json b/packages/xarc-react/package.json index f829de539..1528f8be2 100644 --- a/packages/xarc-react/package.json +++ b/packages/xarc-react/package.json @@ -24,6 +24,7 @@ "author": "Electrode", "license": "Apache-2.0", "dependencies": { + "@types/react": ">= 16", "@xarc/render-context": "^1.0.3", "@xarc/subapp": "^0.1.4", "@xarc/tag-renderer": "^1.0.3", diff --git a/packages/xarc-react/src/common/index.ts b/packages/xarc-react/src/common/index.ts index af91ac01c..67fa307d5 100644 --- a/packages/xarc-react/src/common/index.ts +++ b/packages/xarc-react/src/common/index.ts @@ -3,7 +3,7 @@ import ReactDom from "react-dom"; import ReactDomServer from "react-dom/server"; import { SubAppOptions, SubApp, SubAppFeatureFactory, SubAppDef } from "@xarc/subapp"; -export type ReactSubApp = SubApp; +export type ReactSubApp = SubApp; // // re-exports diff --git a/samples/create-app-demo/src/import-assets.d.ts b/samples/create-app-demo/src/import-assets.d.ts new file mode 100644 index 000000000..7d1f2ebf8 --- /dev/null +++ b/samples/create-app-demo/src/import-assets.d.ts @@ -0,0 +1,5 @@ +// custom typing for import assets +declare module "*.png" { + const value: any; + export default value; +}