@xyd-js/core 0.0.0-build

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/tsconfig.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "compilerOptions": {
3
+ "outDir": "./dist",
4
+ "module": "esnext",
5
+ "esModuleInterop": true,
6
+ "moduleResolution": "node",
7
+ "target": "ES6",
8
+ "lib": [
9
+ "dom",
10
+ "dom.iterable",
11
+ "esnext"
12
+ ],
13
+ "allowJs": true,
14
+ "skipLibCheck": true,
15
+ "strict": false,
16
+ "noEmit": true,
17
+ "incremental": false,
18
+ "resolveJsonModule": true,
19
+ "isolatedModules": true,
20
+ "jsx": "preserve",
21
+ "plugins": [
22
+ {
23
+ "name": "next"
24
+ }
25
+ ],
26
+ "strictNullChecks": true
27
+ },
28
+ "include": [
29
+ "next-env.d.ts",
30
+ "**/*.ts",
31
+ "**/*.tsx",
32
+ ".next/types/**/*.ts"
33
+ ],
34
+ "exclude": [
35
+ "node_modules"
36
+ ]
37
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "outDir": ""
5
+ }
6
+ }
package/tsup.config.ts ADDED
@@ -0,0 +1,23 @@
1
+ import {defineConfig, Options} from 'tsup';
2
+
3
+ const config: Options = {
4
+ entry: ['index.ts'],
5
+ format: ['esm'], // Output both ESM and CJS formats
6
+ target: 'node16', // Ensure compatibility with Node.js 16
7
+ dts: {
8
+ entry: 'index.ts', // Specify the entry for DTS
9
+ resolve: true, // Resolve external types
10
+ },
11
+ splitting: false, // Disable code splitting
12
+ sourcemap: true, // Generate source maps
13
+ clean: true, // Clean the output directory before each build
14
+ esbuildOptions: (options) => {
15
+ options.platform = 'node'; // Ensure the platform is set to Node.js
16
+ options.external = ['node:fs/promises']; // Mark 'node:fs/promises' as external
17
+ options.loader = {'.js': 'jsx'}; // Ensure proper handling of .js files
18
+ },
19
+ tsconfig: 'tsconfig.tsup.json',
20
+ ignoreWatch: ['node_modules', 'dist', '.git', 'build'] // Exclude unnecessary directories
21
+ }
22
+
23
+ export default defineConfig(config);