parent
4e1510cd5d
commit
537678324d
@ -1,36 +0,0 @@ |
|||||||
import { defineConfig } from '@farmfe/core'; |
|
||||||
import farmDtsPlugin from '@farmfe/js-plugin-dts'; |
|
||||||
|
|
||||||
const format = (process.env.FARM_FORMAT as 'esm' | 'cjs') || 'esm'; |
|
||||||
const ext = format === 'esm' ? 'mjs' : 'cjs'; |
|
||||||
|
|
||||||
export default defineConfig({ |
|
||||||
compilation: { |
|
||||||
input: { |
|
||||||
index: './src/index.ts', |
|
||||||
}, |
|
||||||
output: { |
|
||||||
path: `dist/${format}`, |
|
||||||
entryFilename: `[entryName].${ext}`, |
|
||||||
targetEnv: 'library', |
|
||||||
format, |
|
||||||
clean: false, |
|
||||||
}, |
|
||||||
external: ['!^(\\./|\\.\\./|[A-Za-z]:\\\\|/|^@/).*'], |
|
||||||
partialBundling: { |
|
||||||
enforceResources: [ |
|
||||||
{ |
|
||||||
name: 'index', |
|
||||||
test: ['.+'], |
|
||||||
}, |
|
||||||
], |
|
||||||
}, |
|
||||||
minify: false, |
|
||||||
sourcemap: false, |
|
||||||
presetEnv: false, |
|
||||||
lazyCompilation: false, |
|
||||||
persistentCache: true, |
|
||||||
externalNodeBuiltins: false, |
|
||||||
}, |
|
||||||
plugins: [farmDtsPlugin()], |
|
||||||
}); |
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,13 @@ |
|||||||
|
import type { Options } from 'tsup' |
||||||
|
|
||||||
|
export const tsup: Options = { |
||||||
|
entry: [ |
||||||
|
'src/*.ts', |
||||||
|
], |
||||||
|
format: 'esm', |
||||||
|
dts: true, |
||||||
|
splitting: true, |
||||||
|
clean: true, |
||||||
|
shims: false, |
||||||
|
external:['alien-signals'], |
||||||
|
} |
Loading…
Reference in new issue