Open silverbackdan opened 2 years ago
A couple of options:
siroc
to https://github.com/unjs/unbuild - which does allow more granular configuration. That may be a better option for you in this case.import { defineSirocConfig } from 'siroc'
export default defineSirocConfig({
hooks: {
'build:extendRollup'(pkg, { rollupConfig }) {
const declaration = rollupConfig.findIndex(i => i.output.file?.endsWith('.d.ts'))
rollupConfig.splice(declaration, 1)
},
},
})
๐ The bug I have a package.json file but was looking to override it for the siroc build. I tried copying the entire file, changing just the "typings" property but siroc still appears to use the original
๐ ๏ธ To reproduce Use a ts config like:
or
๐ Expected behaviour Ideally I'd like to override individual parameters without having to define a completely new package.json - however it would be acceptable to be able to have any way to override these options.
โน๏ธ Additional context Originally, I just wanted to disable siroc from creating the
index.d.ts
definitions. This file already exists and siroc is overwriting it. There is then another command run to create a type definition in a./dist
directory, which the main./index.d.ts
imports. So.. I either wanted to disable it, as I have another command which will create it, or be able to set the location of the definitions file to the dist folder, which my next script can then override.For now, I've added
types
property in my package.json alongside thetypings
property.Related: https://github.com/nuxt-community/auth-module/pull/1400