koatty 3.11.4-2 → 3.11.7

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/.rollup.config.js CHANGED
@@ -1,63 +1,60 @@
1
- /*
2
- * @Description:
3
- * @Usage:
4
- * @Author: richen
5
- * @Date: 2021-12-17 10:20:44
6
- * @LastEditTime: 2022-05-27 11:50:23
7
- */
8
- import json from "@rollup/plugin-json";
9
- import typescript from 'rollup-plugin-typescript2';
10
- // import babel from '@rollup/plugin-babel';
11
-
12
- export default [
13
- {
14
- input: './src/index.ts',
15
- output: [{
16
- format: 'cjs',
17
- file: './dist/index.js',
18
- banner: require('./scripts/copyright')
19
- }],
20
- plugins: [
21
- // babel({
22
- // babelHelpers: "runtime",
23
- // configFile: './babel.config.js',
24
- // exclude: 'node_modules/**',
25
- // }),
26
- json(),
27
- typescript({
28
- tsconfigOverride: {
29
- compilerOptions: {
30
- declaration: false,
31
- declarationMap: false,
32
- module: "ESNext"
33
- }
34
- }
35
- })
36
- ]
37
- },
38
- {
39
- input: './src/index.ts',
40
- output: [{
41
- format: 'es',
42
- file: './dist/index.mjs',
43
- banner: require('./scripts/copyright')
44
- }],
45
- plugins: [
46
- // babel({
47
- // babelHelpers: "runtime",
48
- // configFile: './babel.config.js',
49
- // exclude: 'node_modules/**',
50
- // }),
51
- json(),
52
- typescript({
53
- tsconfigOverride: {
54
- compilerOptions: {
55
- declaration: false,
56
- declarationMap: false,
57
- module: "ESNext"
58
- }
59
- }
60
- })
61
- ]
62
- }
1
+ /*
2
+ * @Description:
3
+ * @Usage:
4
+ * @Author: richen
5
+ * @Date: 2021-12-17 10:20:44
6
+ * @LastEditTime: 2024-11-29 17:33:44
7
+ */
8
+ import commonjs from '@rollup/plugin-commonjs';
9
+ import json from "@rollup/plugin-json";
10
+ import resolve from '@rollup/plugin-node-resolve';
11
+ import { builtinModules } from 'module';
12
+ import del from "rollup-plugin-delete";
13
+ import typescript from 'rollup-plugin-typescript2';
14
+ // import babel from '@rollup/plugin-babel';
15
+ const pkg = require('./package.json');
16
+
17
+ export default [
18
+ {
19
+ input: './src/index.ts',
20
+ output: [
21
+ {
22
+ format: 'cjs',
23
+ file: './dist/index.js',
24
+ banner: require('./scripts/copyright'),
25
+ },
26
+ {
27
+ format: 'es',
28
+ file: './dist/index.mjs',
29
+ banner: require('./scripts/copyright'),
30
+ },
31
+ ],
32
+ plugins: [
33
+ del({ targets: ["dist/*", "temp/*", "docs/api"] }),
34
+ // babel({
35
+ // babelHelpers: "runtime",
36
+ // configFile: './babel.config.js',
37
+ // exclude: 'node_modules/**',
38
+ // }),
39
+ json(),
40
+ resolve({
41
+ preferBuiltins: true, // 优先选择内置模块
42
+ }),
43
+ commonjs(),
44
+ typescript({
45
+ tsconfigOverride: {
46
+ compilerOptions: {
47
+ declaration: false,
48
+ declarationMap: false,
49
+ module: "ESNext"
50
+ }
51
+ }
52
+ })
53
+ ],
54
+ external: [
55
+ ...builtinModules, // 排除 Node.js 内置模块
56
+ ...Object.keys(pkg.dependencies || {}), // 排除 package.json 中的外部依赖
57
+ ],
58
+ },
59
+
63
60
  ]
@@ -1,42 +1,42 @@
1
- {
2
- "version": "0.2.0",
3
- "configurations": [
4
- {
5
- "type": "node",
6
- "request": "launch",
7
- "name": "Koatty Demo Program",
8
- "args": [
9
- "${workspaceRoot}/demo/src/App.ts"
10
- ],
11
- "runtimeArgs": [
12
- "--nolazy",
13
- "-r",
14
- "ts-node/register"
15
- ],
16
- "env": {
17
- "NODE_ENV": "development"
18
- },
19
- "outputCapture": "std",
20
- "sourceMaps": true,
21
- "cwd": "${workspaceRoot}",
22
- "protocol": "inspector",
23
- "internalConsoleOptions": "neverOpen"
24
- },
25
- {
26
- "type": "node",
27
- "name": "vscode-jest-tests",
28
- "request": "launch",
29
- "console": "integratedTerminal",
30
- "internalConsoleOptions": "neverOpen",
31
- "disableOptimisticBPs": true,
32
- "program": "${workspaceFolder}/node_modules/.bin/jest",
33
- "cwd": "${workspaceFolder}",
34
- "args": [
35
- "--config",
36
- "jest.config.js",
37
- "--runInBand",
38
- "--watchAll=false"
39
- ]
40
- }
41
- ]
1
+ {
2
+ "version": "0.2.0",
3
+ "configurations": [
4
+ {
5
+ "type": "node",
6
+ "request": "launch",
7
+ "name": "Koatty Demo Program",
8
+ "args": [
9
+ "${workspaceRoot}/demo/src/App.ts"
10
+ ],
11
+ "runtimeArgs": [
12
+ "--nolazy",
13
+ "-r",
14
+ "ts-node/register"
15
+ ],
16
+ "env": {
17
+ "NODE_ENV": "development"
18
+ },
19
+ "outputCapture": "std",
20
+ "sourceMaps": true,
21
+ "cwd": "${workspaceRoot}",
22
+ "protocol": "inspector",
23
+ "internalConsoleOptions": "neverOpen"
24
+ },
25
+ {
26
+ "type": "node",
27
+ "name": "vscode-jest-tests",
28
+ "request": "launch",
29
+ "console": "integratedTerminal",
30
+ "internalConsoleOptions": "neverOpen",
31
+ "disableOptimisticBPs": true,
32
+ "program": "${workspaceFolder}/node_modules/.bin/jest",
33
+ "cwd": "${workspaceFolder}",
34
+ "args": [
35
+ "--config",
36
+ "jest.config.js",
37
+ "--runInBand",
38
+ "--watchAll=false"
39
+ ]
40
+ }
41
+ ]
42
42
  }