@layerzerolabs/tsup-config-next 1.5.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +28 -0
- package/index.ts +31 -0
- package/package.json +27 -0
- package/tsconfig.json +10 -0
package/README.md
ADDED
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AAEnC,eAAO,MAAM,gBAAgB,QAAO,QAAQ,OAAO,CAuBjD,CAAA;AAEF,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import commonjsPlugin from '@chialab/esbuild-plugin-commonjs';
|
|
2
|
+
import { nodeExternalsPlugin } from 'esbuild-node-externals';
|
|
3
|
+
export const getDefaultConfig = () => ({
|
|
4
|
+
esbuildPlugins: [
|
|
5
|
+
commonjsPlugin(),
|
|
6
|
+
nodeExternalsPlugin({
|
|
7
|
+
dependencies: false,
|
|
8
|
+
devDependencies: false,
|
|
9
|
+
}),
|
|
10
|
+
],
|
|
11
|
+
// lets be explicit about module type
|
|
12
|
+
outExtension({ format }) {
|
|
13
|
+
if (format === 'cjs') {
|
|
14
|
+
return { js: '.cjs' };
|
|
15
|
+
}
|
|
16
|
+
else if (format === 'esm') {
|
|
17
|
+
return { js: '.mjs' };
|
|
18
|
+
}
|
|
19
|
+
throw new Error(`Format ${format} is not supported`);
|
|
20
|
+
},
|
|
21
|
+
clean: false,
|
|
22
|
+
dts: true,
|
|
23
|
+
sourcemap: true,
|
|
24
|
+
splitting: false,
|
|
25
|
+
treeshake: true,
|
|
26
|
+
format: ['cjs', 'esm'],
|
|
27
|
+
});
|
|
28
|
+
export { defineConfig } from 'tsup';
|
package/index.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import commonjsPlugin from '@chialab/esbuild-plugin-commonjs'
|
|
2
|
+
import { nodeExternalsPlugin } from 'esbuild-node-externals'
|
|
3
|
+
|
|
4
|
+
import type { Options } from 'tsup'
|
|
5
|
+
|
|
6
|
+
export const getDefaultConfig = (): Partial<Options> => ({
|
|
7
|
+
esbuildPlugins: [
|
|
8
|
+
commonjsPlugin(),
|
|
9
|
+
nodeExternalsPlugin({
|
|
10
|
+
dependencies: false,
|
|
11
|
+
devDependencies: false,
|
|
12
|
+
}),
|
|
13
|
+
],
|
|
14
|
+
// lets be explicit about module type
|
|
15
|
+
outExtension({ format }) {
|
|
16
|
+
if (format === 'cjs') {
|
|
17
|
+
return { js: '.cjs' }
|
|
18
|
+
} else if (format === 'esm') {
|
|
19
|
+
return { js: '.mjs' }
|
|
20
|
+
}
|
|
21
|
+
throw new Error(`Format ${format} is not supported`)
|
|
22
|
+
},
|
|
23
|
+
clean: false,
|
|
24
|
+
dts: true,
|
|
25
|
+
sourcemap: true,
|
|
26
|
+
splitting: false,
|
|
27
|
+
treeshake: true,
|
|
28
|
+
format: ['cjs', 'esm'],
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
export { defineConfig, Options } from 'tsup'
|
package/package.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@layerzerolabs/tsup-config-next",
|
|
3
|
+
"version": "1.5.73",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"exports": {
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"default": "./dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"main": "./dist/index.js",
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "$npm_execpath tsc"
|
|
13
|
+
},
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@chialab/esbuild-plugin-commonjs": "^0.17.2",
|
|
16
|
+
"esbuild": "^0.19.8",
|
|
17
|
+
"esbuild-node-externals": "^1.11.0",
|
|
18
|
+
"tsup": "^8.0.1"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@layerzerolabs/typescript-config-next": "^1.5.73",
|
|
22
|
+
"typescript": "~5.2.2"
|
|
23
|
+
},
|
|
24
|
+
"publishConfig": {
|
|
25
|
+
"access": "public"
|
|
26
|
+
}
|
|
27
|
+
}
|