mirror of
https://github.com/unjs/unplugin.git
synced 2026-02-01 16:56:37 +00:00
* feat: support resolveId for rspack * fix * use resolve hook * use alpha version * remove skip rspack * lint code * Update src/rspack/utils.ts Co-authored-by: Kevin Deng 三咲智子 <sxzz@sxzz.moe> * Update docs/guide/index.md Co-authored-by: Kevin Deng 三咲智子 <sxzz@sxzz.moe> --------- Co-authored-by: Kevin Deng 三咲智子 <sxzz@sxzz.moe>
38 lines
643 B
TypeScript
38 lines
643 B
TypeScript
import type { Options } from 'tsup'
|
|
import { copy } from 'esbuild-plugin-copy'
|
|
|
|
export const tsup: Options = {
|
|
splitting: false,
|
|
sourcemap: false,
|
|
clean: true,
|
|
format: ['cjs', 'esm'],
|
|
target: 'node14',
|
|
dts: true,
|
|
shims: true,
|
|
entry: [
|
|
'src/index.ts',
|
|
'src/webpack/loaders/*',
|
|
'src/rspack/loaders/*',
|
|
],
|
|
external: [
|
|
'vite',
|
|
'webpack',
|
|
'rollup',
|
|
'esbuild',
|
|
'@farmfe/core',
|
|
],
|
|
define: {
|
|
__DEV__: 'false',
|
|
},
|
|
esbuildPlugins: [
|
|
copy({
|
|
assets: [
|
|
{
|
|
from: ['./src/rspack/virtual.js'],
|
|
to: ['./rspack/virtual.js'],
|
|
},
|
|
],
|
|
}),
|
|
],
|
|
}
|