Skip to content
Discussion options

You must be logged in to vote

@rxliuli By default, we are adding .ts files as the latest Node.js version prefers adding an extension to every import.

A file extension must be provided when using the import keyword to resolve relative or absolute specifiers. Directory indexes (e.g. './startup/index.js' ) must also be fully specified. This behavior matches how import behaves in browser environments, assuming a typically configured server.

This could be overriden by using https://www.kubb.dev/getting-started/configure#output-extension, for example:

import { defineConfig } from '@kubb/core'

export default defineConfig({
  input: {
    path: './petStore.yaml',
  },
  output: {
    path: './src/gen',
    extension: {
   …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by rxliuli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants