mirror of
https://github.com/tribufu/node-gamedig
synced 2026-06-01 09:42:41 +00:00
Ignore got in commonjs build
This commit is contained in:
parent
dcc5dada47
commit
199e49184d
1 changed files with 4 additions and 3 deletions
|
|
@ -9,19 +9,20 @@ const baseConfig = {
|
||||||
minify: false,
|
minify: false,
|
||||||
sourcemap: false,
|
sourcemap: false,
|
||||||
legalComments: 'none',
|
legalComments: 'none',
|
||||||
plugins: [nodeExternalsPlugin()]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const moduleConfig = {
|
const moduleConfig = {
|
||||||
...baseConfig,
|
...baseConfig,
|
||||||
outfile: 'dist/index.mjs',
|
outfile: 'dist/index.mjs',
|
||||||
format: 'esm'
|
format: 'esm',
|
||||||
|
plugins: [nodeExternalsPlugin()]
|
||||||
}
|
}
|
||||||
|
|
||||||
const legacyConfig = {
|
const legacyConfig = {
|
||||||
...baseConfig,
|
...baseConfig,
|
||||||
outfile: 'dist/index.cjs',
|
outfile: 'dist/index.cjs',
|
||||||
format: 'cjs'
|
format: 'cjs',
|
||||||
|
plugins: [nodeExternalsPlugin({ allowList: ['got'] })]
|
||||||
}
|
}
|
||||||
|
|
||||||
build(moduleConfig).then(() => { }).catch(() => { process.exit(1) })
|
build(moduleConfig).then(() => { }).catch(() => { process.exit(1) })
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue