-
-
Notifications
You must be signed in to change notification settings - Fork 81
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
[Feature Request]: Auto generate dts file dir #515
Comments
Thanks! I’m glad you like it! |
Thank you for your reply! I'm trying to add all dts files to a single folder like import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueRouter from 'unplugin-vue-router/vite'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
vueRouter({ dts: '.types/typed-router.d.ts' }),
vue()
],
}) But when I run the build script, it seems there are some errors: So I'm considering if it's possible to implement ensuring the folder exists in this plugin. Maybe use native node fs module is a better way? like: |
Using the native module sounds good |
This is a really awesome package, I have been using it in my vite project with default options, it works great. But there are some options that confuse me.
options.dts
support to use a string as a path of target dts file path, I would love to adding support for auto generate dir if does not exist. And maybe we can usefs-extra
ensure the path incontext
? or impl aensureDir
function manully(I have created a demo for this
If needed, I would be happy to provide a PR for this issue.
Thank you for your consideration.
The text was updated successfully, but these errors were encountered: