@windwalker-io/fusion-next 0.1.1 → 0.1.2
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/LICENSE +19 -19
- package/dist/index.cjs +12 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +12 -8
- package/dist/index.js.map +1 -1
- package/jest.config.ts +214 -214
- package/package.json +54 -54
- package/resources/img/credit.txt +2 -2
- package/types/vue/global.d.ts +14 -14
- package/types/vue/shims-vue.d.ts +5 -5
- package/types/vue/vue-runtime.d.ts +16 -16
- package/vite.config.ts +71 -71
package/vite.config.ts
CHANGED
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
import { readFileSync } from 'node:fs';
|
|
2
|
-
import { resolve } from 'path';
|
|
3
|
-
import { defineConfig } from "vite";
|
|
4
|
-
import dts from "unplugin-dts/vite";
|
|
5
|
-
const dependencies = JSON.parse(readFileSync('./package.json', 'utf8')).dependencies || {};
|
|
6
|
-
|
|
7
|
-
export default defineConfig(({ mode }) => {
|
|
8
|
-
return {
|
|
9
|
-
resolve: {
|
|
10
|
-
alias: {
|
|
11
|
-
'@': resolve('./src'),
|
|
12
|
-
},
|
|
13
|
-
},
|
|
14
|
-
build: {
|
|
15
|
-
lib: {
|
|
16
|
-
entry: 'src/index.ts',
|
|
17
|
-
formats: ['es', 'cjs'],
|
|
18
|
-
},
|
|
19
|
-
sourcemap: true,
|
|
20
|
-
rollupOptions: {
|
|
21
|
-
external: [
|
|
22
|
-
/^node:/,
|
|
23
|
-
'fs',
|
|
24
|
-
'path',
|
|
25
|
-
'url',
|
|
26
|
-
'util',
|
|
27
|
-
'crypto',
|
|
28
|
-
'module',
|
|
29
|
-
'os',
|
|
30
|
-
'child_process',
|
|
31
|
-
'worker_threads',
|
|
32
|
-
'tty',
|
|
33
|
-
'vite',
|
|
34
|
-
...Object.keys(dependencies),
|
|
35
|
-
],
|
|
36
|
-
output: [
|
|
37
|
-
{
|
|
38
|
-
format: 'es',
|
|
39
|
-
entryFileNames: 'index.js',
|
|
40
|
-
inlineDynamicImports: true,
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
format: 'cjs',
|
|
44
|
-
entryFileNames: 'index.cjs',
|
|
45
|
-
inlineDynamicImports: true,
|
|
46
|
-
exports: 'named',
|
|
47
|
-
},
|
|
48
|
-
],
|
|
49
|
-
treeshake: { moduleSideEffects: false },
|
|
50
|
-
},
|
|
51
|
-
target: 'esnext',
|
|
52
|
-
outDir: 'dist',
|
|
53
|
-
emptyOutDir: true,
|
|
54
|
-
minify: false,
|
|
55
|
-
},
|
|
56
|
-
plugins: [
|
|
57
|
-
dts({
|
|
58
|
-
// entryRoot: 'src',
|
|
59
|
-
// pathsToAliases: true,
|
|
60
|
-
outDirs: 'dist',
|
|
61
|
-
tsconfigPath: './tsconfig.json',
|
|
62
|
-
insertTypesEntry: true,
|
|
63
|
-
// merge to 1 file
|
|
64
|
-
// rollupTypes: true,
|
|
65
|
-
bundleTypes: true,
|
|
66
|
-
}),
|
|
67
|
-
],
|
|
68
|
-
};
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import { resolve } from 'path';
|
|
3
|
+
import { defineConfig } from "vite";
|
|
4
|
+
import dts from "unplugin-dts/vite";
|
|
5
|
+
const dependencies = JSON.parse(readFileSync('./package.json', 'utf8')).dependencies || {};
|
|
6
|
+
|
|
7
|
+
export default defineConfig(({ mode }) => {
|
|
8
|
+
return {
|
|
9
|
+
resolve: {
|
|
10
|
+
alias: {
|
|
11
|
+
'@': resolve('./src'),
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
build: {
|
|
15
|
+
lib: {
|
|
16
|
+
entry: 'src/index.ts',
|
|
17
|
+
formats: ['es', 'cjs'],
|
|
18
|
+
},
|
|
19
|
+
sourcemap: true,
|
|
20
|
+
rollupOptions: {
|
|
21
|
+
external: [
|
|
22
|
+
/^node:/,
|
|
23
|
+
'fs',
|
|
24
|
+
'path',
|
|
25
|
+
'url',
|
|
26
|
+
'util',
|
|
27
|
+
'crypto',
|
|
28
|
+
'module',
|
|
29
|
+
'os',
|
|
30
|
+
'child_process',
|
|
31
|
+
'worker_threads',
|
|
32
|
+
'tty',
|
|
33
|
+
'vite',
|
|
34
|
+
...Object.keys(dependencies),
|
|
35
|
+
],
|
|
36
|
+
output: [
|
|
37
|
+
{
|
|
38
|
+
format: 'es',
|
|
39
|
+
entryFileNames: 'index.js',
|
|
40
|
+
inlineDynamicImports: true,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
format: 'cjs',
|
|
44
|
+
entryFileNames: 'index.cjs',
|
|
45
|
+
inlineDynamicImports: true,
|
|
46
|
+
exports: 'named',
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
treeshake: { moduleSideEffects: false },
|
|
50
|
+
},
|
|
51
|
+
target: 'esnext',
|
|
52
|
+
outDir: 'dist',
|
|
53
|
+
emptyOutDir: true,
|
|
54
|
+
minify: false,
|
|
55
|
+
},
|
|
56
|
+
plugins: [
|
|
57
|
+
dts({
|
|
58
|
+
// entryRoot: 'src',
|
|
59
|
+
// pathsToAliases: true,
|
|
60
|
+
outDirs: 'dist',
|
|
61
|
+
tsconfigPath: './tsconfig.json',
|
|
62
|
+
insertTypesEntry: true,
|
|
63
|
+
// merge to 1 file
|
|
64
|
+
// rollupTypes: true,
|
|
65
|
+
bundleTypes: true,
|
|
66
|
+
}),
|
|
67
|
+
],
|
|
68
|
+
};
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
|