nitro
nitro copied to clipboard
Custom autoImport config not replicating
Environment
Nitropack: 0.4.8
Node: 16.11.0
Reproduction
nitro.config.ts
import { defineNitroConfig } from 'nitropack'
export default defineNitroConfig({
autoImport: {
dirs: [
"./utils"
],
}
})
Describe the bug
When declaring custom autoimports, you have to set the autoImport.dts
path to ./.nitro/types/nitro.d.ts"
, otherwise it will not update the autoimports.
Additional context
This seems to be a nitro issue, as when using the custom .dts setting, it does not show the generated automatically by nitro text - meaning that nitro must parse the autoimport .d.ts somehow?
Logs
No response
/cc @antfu @danielroe
Seems to be working in latest version:
//https://nitro.unjs.io/config
export default defineNitroConfig({
srcDir: "server",
imports: {
dirs: [
"./utils2"
],
}
});