https://github.com/drwpow/vue-esm-types
https://github.com/drwpow/vue-esm-types
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/drwpow/vue-esm-types
- Owner: drwpow
- Created: 2019-09-16T05:16:39.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-09-16T05:22:47.000Z (almost 7 years ago)
- Last Synced: 2025-02-10T04:17:33.600Z (over 1 year ago)
- Language: TypeScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vue-esm-types
Simple recreation of a problem where Vue.js alternate builds (such as the ESM
build) don’t properly expose types to TypeScript.
To recreate, run:
```bash
npm i
npm run build
```
You should see the following error:
```
Could not find a declaration file for module 'vue/dist/vue.esm.browser'. '../node_modules/vue/dist/vue.esm.browser.js' implicitly has an 'any' type.
Try `npm install @types/vue` if it exists or add a new declaration (.d.ts) file containing `declare module 'vue/dist/vue.esm.browser';`
```
Try swapping out the import with the commented-out one, and it will build
perfectly.