bug: not applied when `bundle: false` is used with `tsup`
Closed this issue · 3 comments
shellscape commented
Is there an existing issue for this?
- I have searched the existing issues
Description of the bug
When bundle: false
is specified for tsup options, this plugin isn't applied. I'm not sure this is a bug with the plugin itself, or if this is default behavior by tsup when bundling is disabled (e.g. it doesn't use esbuild).
Steps To Reproduce
Here's a config that demonstrates the issue:
import { esbuildPluginFilePathExtensions } from 'esbuild-plugin-file-path-extensions';
import { defineConfig } from 'tsup';
export default defineConfig({
// bundle: false,
clean: true,
dts: true,
entry: ['src/*.ts', 'src/*.tsx'],
esbuildPlugins: [esbuildPluginFilePathExtensions({ esmExtension: 'js' })],
format: ['cjs', 'esm'],
// keepNames: true,
outDir: 'dist',
// skipNodeModulesBundle: true,
sourcemap: true,
target: ['es2022', 'node18']
});
Expected behavior
I would expect the plugin to apply the file extensions, but again that may not be an issue with this plugin. Feel free to nuke this from orbit if it's not something concerned with this plugin.
Screenshots
No response
Additional context
No response
shellscape commented
Looks like this may not be the fault of tsup or this plugin egoist/tsup#729 (comment)
favna commented
The readme of this package also instructs to use bundle: true when using tsup so I'm closing this and I'll just say: RTM
shellscape commented
Missed that, thanks!