snapshot of https://github.com/TanStack/query.git (main, 2026-09-16; blobs > 131072B omitted)
This commit is contained in:
49
packages/eslint-plugin-query/root.tsdown.config.js
Normal file
49
packages/eslint-plugin-query/root.tsdown.config.js
Normal file
@@ -0,0 +1,49 @@
|
||||
// @ts-check
|
||||
|
||||
/**
|
||||
* @param {Object} opts - Options for building configurations.
|
||||
* @param {string[]} opts.entry - The entry array.
|
||||
* @returns {import('tsdown').UserConfig}
|
||||
*/
|
||||
export function modernConfig(opts) {
|
||||
return {
|
||||
entry: opts.entry,
|
||||
format: ['cjs', 'esm'],
|
||||
target: ['chrome91', 'firefox90', 'edge91', 'safari15', 'ios15', 'opera77'],
|
||||
outDir: 'build/modern',
|
||||
dts: true,
|
||||
fixedExtension: false,
|
||||
sourcemap: true,
|
||||
clean: true,
|
||||
deps: { neverBundle: ['typescript'] },
|
||||
footer: ({ format, fileName }) =>
|
||||
format === 'cjs' && fileName.endsWith('index.cjs')
|
||||
? 'module.exports = module.exports.default'
|
||||
: undefined,
|
||||
outputOptions: {
|
||||
exports: 'named',
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Object} opts - Options for building configurations.
|
||||
* @param {string[]} opts.entry - The entry array.
|
||||
* @returns {import('tsdown').UserConfig}
|
||||
*/
|
||||
export function legacyConfig(opts) {
|
||||
return {
|
||||
entry: opts.entry,
|
||||
format: ['cjs', 'esm'],
|
||||
target: ['es2020', 'node16'],
|
||||
outDir: 'build/legacy',
|
||||
dts: true,
|
||||
fixedExtension: false,
|
||||
sourcemap: true,
|
||||
clean: true,
|
||||
deps: { neverBundle: ['typescript'] },
|
||||
outputOptions: {
|
||||
exports: 'named',
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user