Open burt202 opened 1 day ago
v3.0.6
will resolve your issue.
You will need to use barrelType: 'propagate',
instead on plugin level so the output could still use the barrel file.
See https://www.kubb.dev/plugins/plugin-react-query/#output-barreltype-1
Thanks for the quick reply. This is still not working for me using v3.0.6
using the following config:
import {defineConfig} from '@kubb/core'
import {pluginOas} from '@kubb/plugin-oas'
import {pluginTs} from '@kubb/plugin-ts'
export default defineConfig({
root: '.',
input: {
path: 'docs/main.yml'
},
output: {
path: 'generated/',
barrelType: 'all',
clean: true
},
plugins: [
pluginOas({
generators: [],
}),
pluginTs({
output: {
path: "./types.ts",
barrelType: 'propagate'
}
})
]
})
Repro code: https://github.com/burt202/kubb-test
The generation runs without error but no index.ts
file is created.
Where am I going wrong?
Cheers!
What version of
kubb
is running?3.0.5
What platform is your computer?
Linux
What version of external packages are you using(
@tanstack-query
,MSW
,React
,Vue
, ...)See linked repo below
What steps can reproduce the bug?
Im trying to upgrade our setup to v3, which takes a yml openapi docs link and spits out generated TS for it. In v2, an
index.ts
file gets created alongside thetypes.ts
but i cant seem to get this working in v3. Im aware of the newbarrelType
option and think im using it correctly to the docsFor repro, clone repo linked below and npm ci and npm run generate
https://github.com/burt202/kubb-test/tree/master
Any help would be appreciated as to what im doing wrong. Cheers!
How often does this bug happen?
Every time
What is the expected behavior?
Index file should be created with the contents
export * from "./types"
Swagger/OpenAPI file?
No response
Additional information
No response