Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: add type declarations to /dist #517

Open
3 tasks done
luqven opened this issue Dec 14, 2023 · 2 comments · May be fixed by #518
Open
3 tasks done

build: add type declarations to /dist #517

luqven opened this issue Dec 14, 2023 · 2 comments · May be fixed by #518
Labels
enhancement New feature or request

Comments

@luqven
Copy link
Contributor

luqven commented Dec 14, 2023

Before you submit:

Is your feature request related to a problem? Please describe.
Type declaration .d.ts file should be included for each bundle in /dist

Describe the solution you'd like
Use a build step to place emitted declaration files into /dist

Describe alternatives you've considered
Using the package.json types: "src/plugins/imgix-vue" field. This is sub-optimal because the types are not bundled together.

Additional context

@luqven luqven added the enhancement New feature or request label Dec 14, 2023
@luqven luqven linked a pull request Dec 14, 2023 that will close this issue
5 tasks
@luqven
Copy link
Contributor Author

luqven commented Dec 14, 2023

We could make use of vite-plugin-dts and add { rollupTypes: true }.

// [vite.config.js](https://github.com/imgix/vue/blob/9aebc6f129422ed21a9272f1a7e3fd9b3207794e/vite.config.js#L41)

import dts from 'vite-plugin-dts';
// ...
export default defineConfig({
  // ...
  plugins: [vue(), dts({ rollupTypes: true })],
  // generates imgix-vue.esm.d, imgix-vue.min.d
})

@luqven luqven removed a link to a pull request Dec 14, 2023
5 tasks
@luqven
Copy link
Contributor Author

luqven commented Dec 14, 2023

Assigned to @namack.

Don't hesitate to reach out if you need any help/feedback tackling this!

namack added a commit to namack/imgix-vue that referenced this issue Dec 14, 2023
@namack namack linked a pull request Dec 14, 2023 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant