mirror of
https://github.com/sussy-code/providers.git
synced 2026-08-16 12:13:51 +00:00
New source
This commit is contained in:
parent
92ca4f2dfb
commit
7f79620b79
1 changed files with 23 additions and 24 deletions
|
|
@ -11,42 +11,41 @@ if (shouldTestProviders) tests = ['src/__test__/providers/**/*.test.ts'];
|
|||
export default defineConfig((env) => ({
|
||||
plugins: [
|
||||
env.mode !== 'test' && eslintPlugin(),
|
||||
dts({
|
||||
rollupTypes: true,
|
||||
}),
|
||||
dts({ rollupTypes: true }),
|
||||
],
|
||||
css: {
|
||||
postcss: {
|
||||
plugins: [],
|
||||
},
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, './src'),
|
||||
},
|
||||
},
|
||||
rollupOptions: {
|
||||
external: [
|
||||
...Object.keys(pkg.dependencies),
|
||||
'puppeteer',
|
||||
'@puppeteer/browsers',
|
||||
'proxy-agent',
|
||||
'node:http',
|
||||
'node:https',
|
||||
'node:url',
|
||||
],
|
||||
output: {
|
||||
globals: Object.fromEntries(
|
||||
Object.keys(pkg.dependencies).map((v) => [v, v])
|
||||
),
|
||||
},
|
||||
outDir: 'lib',
|
||||
build: {
|
||||
minify: false,
|
||||
lib: {
|
||||
entry: path.resolve(__dirname, 'src/index.ts'),
|
||||
name: 'index',
|
||||
fileName: 'index',
|
||||
formats: ['umd', 'es'],
|
||||
},
|
||||
outDir: 'lib',
|
||||
emptyOutDir: true,
|
||||
target: 'esnext',
|
||||
rollupOptions: {
|
||||
// Externalize dependencies that should not be bundled
|
||||
external: [
|
||||
...Object.keys(pkg.dependencies),
|
||||
'puppeteer',
|
||||
'@puppeteer/browsers',
|
||||
'proxy-agent',
|
||||
'node:http',
|
||||
'node:https',
|
||||
'node:url',
|
||||
],
|
||||
output: {
|
||||
globals: Object.fromEntries(
|
||||
Object.keys(pkg.dependencies).map((v) => [v, v])
|
||||
),
|
||||
},
|
||||
},
|
||||
},
|
||||
test: {
|
||||
include: tests,
|
||||
|
|
|
|||
Loading…
Reference in a new issue