nitro icon indicating copy to clipboard operation
nitro copied to clipboard

Custom autoImport config not replicating

Open sasial-dev opened this issue 2 years ago • 1 comments

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

sasial-dev avatar Jun 22 '22 02:06 sasial-dev

/cc @antfu @danielroe

pi0 avatar Jun 22 '22 10:06 pi0

Seems to be working in latest version:

//https://nitro.unjs.io/config
export default defineNitroConfig({
  srcDir: "server",
  imports: {
    dirs: [
        "./utils2"
    ],
  }
});

pi0 avatar May 16 '24 20:05 pi0