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
[Feat Request] Is there any way to generate auto-import.d.ts
manually?
#464
Comments
I am looking into this just now as well. Same thing, for Jenkins pipeline. Not sure why that's not the case for Looks like it should first build the output and then check for typescript errors. For my use-case, I guess it's better to check for type errors in PR, rather than allowing it to pass to the build step. |
I'm also very interested in a way to generate this file manually for the same reasons. I've come up with a workaround for my project. I'd appreciate input from any Vite expert as to whether this is a good idea or not, but I'm instantiating the I guess it might be better to separate out this hack so it's not run for every single Vite command or tool that uses the Example: import { defineConfig } from "vitest/config"
import Vue from "@vitejs/plugin-vue"
import Components from "unplugin-vue-components/vite"
import AutoImport from "unplugin-auto-import/vite"
const autoImportPlugin = AutoImport({
imports: ["vue", "vue-router"],
dts: "src/auto-imports.d.ts",
})
// Ensure .d.ts file is created when running `vite optimize`
autoImportPlugin.buildStart()
export default defineConfig({
plugins: [
Vue({
include: [/\.vue$/],
}),
autoImportPlugin,
Components({
extensions: ["vue"],
dts: "src/components.d.ts",
include: [/\.vue$/, /\.vue\?vue/],
}),
],
}) |
Seems like we need to commit this files... |
Clear and concise description of the problem
We use
unplugin-auto-import
in our project and it's really powerful!the question is that when we develop locally it will auto generate
auto-import.d.ts
file and it cause conflict when merge code, so we add it into.gitignore
and it will cause build error in CI system likeJenkins
since it can not find the file like #288Suggested solution
if there's any way to generate
auto-import.d.ts
file manually?Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: