diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000000..29b48d25f3 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,7 @@ +//These declarations allow TypeScript to import non-js/ts files without the file extensions (such as .vue files) + +declare module "~components/*" {} +declare module "~layouts/*" {} +declare module "~pages/*" {} +declare module "~assets/*" {} +declare module "~static/*" {} diff --git a/package.json b/package.json index 07d604deaa..3e4ecb9904 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ } ], "main": "./index.js", + "types": "./index.d.js", "license": "MIT", "repository": { "type": "git",