@clikvn/agent-widget-embedded 1.1.6 → 1.1.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/CLAUDE.md +169 -169
- package/README.md +20 -20
- package/base.json +21 -21
- package/dist/components/Chat/ui/DatePicker.d.ts +4 -0
- package/dist/components/Chat/ui/DatePicker.d.ts.map +1 -0
- package/dist/components/Chat/ui/Popover.d.ts +7 -0
- package/dist/components/Chat/ui/Popover.d.ts.map +1 -0
- package/dist/index.html +62 -71
- package/dist/web.d.ts.map +1 -1
- package/dist/web.js +1 -1
- package/docs/agent-response-trace/agentflow.txt +62 -62
- package/docs/agent-response-trace/chatflow.txt +26 -26
- package/docs/brand-ui-command-actions-tools.md +269 -269
- package/package.json +101 -101
- package/public/index.html +54 -54
- package/rollup.config.js +67 -67
- package/tailwind.config.cjs +145 -145
package/package.json
CHANGED
|
@@ -1,101 +1,101 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@clikvn/agent-widget-embedded",
|
|
3
|
-
"description": "This is agent widget",
|
|
4
|
-
"version": "1.1.
|
|
5
|
-
"author": "Clik JSC",
|
|
6
|
-
"license": "ISC",
|
|
7
|
-
"type": "module",
|
|
8
|
-
"main": "dist/index.js",
|
|
9
|
-
"types": "dist/index.d.ts",
|
|
10
|
-
"scripts": {
|
|
11
|
-
"dev": "rollup --watch --config rollup.config.js",
|
|
12
|
-
"build": "rollup --config rollup.config.js",
|
|
13
|
-
"lint": "eslint src",
|
|
14
|
-
"lint:fix": "eslint --fix src",
|
|
15
|
-
"prettier": "prettier --write .",
|
|
16
|
-
"pub": "publish --access public",
|
|
17
|
-
"deploy": "yarn build && yarn publish --access public"
|
|
18
|
-
},
|
|
19
|
-
"dependencies": {
|
|
20
|
-
"@clikvn/agent-voice-embedded": "^0.0.10-dev",
|
|
21
|
-
"@fortawesome/fontawesome-svg-core": "^6.6.0",
|
|
22
|
-
"@fortawesome/free-brands-svg-icons": "^6.6.0",
|
|
23
|
-
"@fortawesome/free-regular-svg-icons": "^6.6.0",
|
|
24
|
-
"@fortawesome/free-solid-svg-icons": "^6.6.0",
|
|
25
|
-
"@fortawesome/react-fontawesome": "^0.2.2",
|
|
26
|
-
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
27
|
-
"@radix-ui/react-slot": "^1.1.1",
|
|
28
|
-
"@ts-stack/markdown": "1.4.0",
|
|
29
|
-
"class-variance-authority": "^0.7.1",
|
|
30
|
-
"classnames": "^2.5.1",
|
|
31
|
-
"clsx": "^2.1.1",
|
|
32
|
-
"date-fns": "^4.1.0",
|
|
33
|
-
"device-detector-js": "^3.0.3",
|
|
34
|
-
"framer-motion": "^11.18.0",
|
|
35
|
-
"lucide-react": "^0.546.0",
|
|
36
|
-
"react": "^18.3.1",
|
|
37
|
-
"react-datepicker": "^8.8.0",
|
|
38
|
-
"react-dom": "^18.3.1",
|
|
39
|
-
"react-markdown": "^9.0.3",
|
|
40
|
-
"react-phone-number-input": "^3.4.12",
|
|
41
|
-
"remark-gfm": "^4.0.0",
|
|
42
|
-
"swr": "^2.3.0",
|
|
43
|
-
"usehooks-ts": "^3.1.0",
|
|
44
|
-
"web-vitals": "^2.1.0"
|
|
45
|
-
},
|
|
46
|
-
"eslintConfig": {
|
|
47
|
-
"extends": [
|
|
48
|
-
"react-app",
|
|
49
|
-
"react-app/jest"
|
|
50
|
-
]
|
|
51
|
-
},
|
|
52
|
-
"browserslist": {
|
|
53
|
-
"production": [
|
|
54
|
-
">0.2%",
|
|
55
|
-
"not dead",
|
|
56
|
-
"not op_mini all"
|
|
57
|
-
],
|
|
58
|
-
"development": [
|
|
59
|
-
"last 1 chrome version",
|
|
60
|
-
"last 1 firefox version",
|
|
61
|
-
"last 1 safari version"
|
|
62
|
-
]
|
|
63
|
-
},
|
|
64
|
-
"devDependencies": {
|
|
65
|
-
"@rollup/plugin-babel": "^6.0.4",
|
|
66
|
-
"@rollup/plugin-commonjs": "^28.0.1",
|
|
67
|
-
"@rollup/plugin-json": "^6.1.0",
|
|
68
|
-
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
69
|
-
"@rollup/plugin-typescript": "^12.1.1",
|
|
70
|
-
"@tailwindcss/typography": "^0.5.15",
|
|
71
|
-
"@testing-library/jest-dom": "^5.14.1",
|
|
72
|
-
"@testing-library/react": "^13.0.0",
|
|
73
|
-
"@testing-library/user-event": "^13.2.1",
|
|
74
|
-
"@types/jest": "^29.5.14",
|
|
75
|
-
"@types/node": "^22.9.0",
|
|
76
|
-
"@types/react": "^18.3.12",
|
|
77
|
-
"@types/react-dom": "^18.3.1",
|
|
78
|
-
"@typescript-eslint/eslint-plugin": "^8.20.0",
|
|
79
|
-
"@typescript-eslint/parser": "^8.20.0",
|
|
80
|
-
"autoprefixer": "^10.4.20",
|
|
81
|
-
"eslint": "^8.57.0",
|
|
82
|
-
"eslint-config-prettier": "^10.0.1",
|
|
83
|
-
"eslint-plugin-prettier": "^5.2.2",
|
|
84
|
-
"prettier": "^3.4.2",
|
|
85
|
-
"react-scripts": "5.0.1",
|
|
86
|
-
"rollup": "^4.26.0",
|
|
87
|
-
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
88
|
-
"rollup-plugin-postcss": "^4.0.2",
|
|
89
|
-
"rollup-plugin-replace": "^2.2.0",
|
|
90
|
-
"rollup-plugin-terser": "^7.0.2",
|
|
91
|
-
"rollup-plugin-typescript-paths": "^1.5.0",
|
|
92
|
-
"rollup-plugin-uglify": "^6.0.4",
|
|
93
|
-
"tailwind-merge": "^2.6.0",
|
|
94
|
-
"tailwindcss": "^3.4.15",
|
|
95
|
-
"tailwindcss-animate": "^1.0.7",
|
|
96
|
-
"typescript": "^5.6.3"
|
|
97
|
-
},
|
|
98
|
-
"engines": {
|
|
99
|
-
"node": ">=18.18.0"
|
|
100
|
-
}
|
|
101
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@clikvn/agent-widget-embedded",
|
|
3
|
+
"description": "This is agent widget",
|
|
4
|
+
"version": "1.1.7",
|
|
5
|
+
"author": "Clik JSC",
|
|
6
|
+
"license": "ISC",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "dist/index.js",
|
|
9
|
+
"types": "dist/index.d.ts",
|
|
10
|
+
"scripts": {
|
|
11
|
+
"dev": "rollup --watch --config rollup.config.js",
|
|
12
|
+
"build": "rollup --config rollup.config.js",
|
|
13
|
+
"lint": "eslint src",
|
|
14
|
+
"lint:fix": "eslint --fix src",
|
|
15
|
+
"prettier": "prettier --write .",
|
|
16
|
+
"pub": "publish --access public",
|
|
17
|
+
"deploy": "yarn build && yarn publish --access public"
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@clikvn/agent-voice-embedded": "^0.0.10-dev",
|
|
21
|
+
"@fortawesome/fontawesome-svg-core": "^6.6.0",
|
|
22
|
+
"@fortawesome/free-brands-svg-icons": "^6.6.0",
|
|
23
|
+
"@fortawesome/free-regular-svg-icons": "^6.6.0",
|
|
24
|
+
"@fortawesome/free-solid-svg-icons": "^6.6.0",
|
|
25
|
+
"@fortawesome/react-fontawesome": "^0.2.2",
|
|
26
|
+
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
27
|
+
"@radix-ui/react-slot": "^1.1.1",
|
|
28
|
+
"@ts-stack/markdown": "1.4.0",
|
|
29
|
+
"class-variance-authority": "^0.7.1",
|
|
30
|
+
"classnames": "^2.5.1",
|
|
31
|
+
"clsx": "^2.1.1",
|
|
32
|
+
"date-fns": "^4.1.0",
|
|
33
|
+
"device-detector-js": "^3.0.3",
|
|
34
|
+
"framer-motion": "^11.18.0",
|
|
35
|
+
"lucide-react": "^0.546.0",
|
|
36
|
+
"react": "^18.3.1",
|
|
37
|
+
"react-datepicker": "^8.8.0",
|
|
38
|
+
"react-dom": "^18.3.1",
|
|
39
|
+
"react-markdown": "^9.0.3",
|
|
40
|
+
"react-phone-number-input": "^3.4.12",
|
|
41
|
+
"remark-gfm": "^4.0.0",
|
|
42
|
+
"swr": "^2.3.0",
|
|
43
|
+
"usehooks-ts": "^3.1.0",
|
|
44
|
+
"web-vitals": "^2.1.0"
|
|
45
|
+
},
|
|
46
|
+
"eslintConfig": {
|
|
47
|
+
"extends": [
|
|
48
|
+
"react-app",
|
|
49
|
+
"react-app/jest"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"browserslist": {
|
|
53
|
+
"production": [
|
|
54
|
+
">0.2%",
|
|
55
|
+
"not dead",
|
|
56
|
+
"not op_mini all"
|
|
57
|
+
],
|
|
58
|
+
"development": [
|
|
59
|
+
"last 1 chrome version",
|
|
60
|
+
"last 1 firefox version",
|
|
61
|
+
"last 1 safari version"
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
"devDependencies": {
|
|
65
|
+
"@rollup/plugin-babel": "^6.0.4",
|
|
66
|
+
"@rollup/plugin-commonjs": "^28.0.1",
|
|
67
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
68
|
+
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
69
|
+
"@rollup/plugin-typescript": "^12.1.1",
|
|
70
|
+
"@tailwindcss/typography": "^0.5.15",
|
|
71
|
+
"@testing-library/jest-dom": "^5.14.1",
|
|
72
|
+
"@testing-library/react": "^13.0.0",
|
|
73
|
+
"@testing-library/user-event": "^13.2.1",
|
|
74
|
+
"@types/jest": "^29.5.14",
|
|
75
|
+
"@types/node": "^22.9.0",
|
|
76
|
+
"@types/react": "^18.3.12",
|
|
77
|
+
"@types/react-dom": "^18.3.1",
|
|
78
|
+
"@typescript-eslint/eslint-plugin": "^8.20.0",
|
|
79
|
+
"@typescript-eslint/parser": "^8.20.0",
|
|
80
|
+
"autoprefixer": "^10.4.20",
|
|
81
|
+
"eslint": "^8.57.0",
|
|
82
|
+
"eslint-config-prettier": "^10.0.1",
|
|
83
|
+
"eslint-plugin-prettier": "^5.2.2",
|
|
84
|
+
"prettier": "^3.4.2",
|
|
85
|
+
"react-scripts": "5.0.1",
|
|
86
|
+
"rollup": "^4.26.0",
|
|
87
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
88
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
89
|
+
"rollup-plugin-replace": "^2.2.0",
|
|
90
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
91
|
+
"rollup-plugin-typescript-paths": "^1.5.0",
|
|
92
|
+
"rollup-plugin-uglify": "^6.0.4",
|
|
93
|
+
"tailwind-merge": "^2.6.0",
|
|
94
|
+
"tailwindcss": "^3.4.15",
|
|
95
|
+
"tailwindcss-animate": "^1.0.7",
|
|
96
|
+
"typescript": "^5.6.3"
|
|
97
|
+
},
|
|
98
|
+
"engines": {
|
|
99
|
+
"node": ">=18.18.0"
|
|
100
|
+
}
|
|
101
|
+
}
|
package/public/index.html
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="vi">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
-
<title>Clik Agent Widget - Dev</title>
|
|
7
|
-
<style>
|
|
8
|
-
html,
|
|
9
|
-
body {
|
|
10
|
-
height: 100%;
|
|
11
|
-
margin: 0;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
body {
|
|
15
|
-
display: flex;
|
|
16
|
-
align-items: center;
|
|
17
|
-
justify-content: center;
|
|
18
|
-
}
|
|
19
|
-
</style>
|
|
20
|
-
<script type="module">
|
|
21
|
-
import Agent from 'http://localhost:3000/web.js'; // Change to from './web.js' to 'https://localhost:5678/web.js'
|
|
22
|
-
Agent.initWidget({
|
|
23
|
-
apiHost: 'https://ci-api.clik.vn/chatbot',
|
|
24
|
-
agentId: 'fe4cf6a9-fa43-4986-bc6f-df67092568c6',
|
|
25
|
-
overrideConfig: {
|
|
26
|
-
chatId: 'f6a855d2-7edc-4fb8-9dd3-74204aa1e2a2',
|
|
27
|
-
skipSuggestion: true,
|
|
28
|
-
overrideConfig: {
|
|
29
|
-
vars: {
|
|
30
|
-
TOUR_CODE: 'TOUR_K9EK76KTX7K4',
|
|
31
|
-
LANGUAGE: 'VN',
|
|
32
|
-
CLIK_GRAPHQL_API: 'https://api.clik.vn/graphql',
|
|
33
|
-
CLIK_VIRTUALTOUR_API: 'https://api.clik.vn/vt360',
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
listeners: {
|
|
38
|
-
ON_LINK_CLICK: console.log,
|
|
39
|
-
},
|
|
40
|
-
theme: {
|
|
41
|
-
simplified: true,
|
|
42
|
-
autoCloseAudioPlayer: true,
|
|
43
|
-
hideAudioMetadata: true,
|
|
44
|
-
},
|
|
45
|
-
onLoaded: (tool) => {
|
|
46
|
-
window.tool = tool;
|
|
47
|
-
},
|
|
48
|
-
});
|
|
49
|
-
</script>
|
|
50
|
-
</head>
|
|
51
|
-
<body>
|
|
52
|
-
<clik-agent-widget></clik-agent-widget>
|
|
53
|
-
</body>
|
|
54
|
-
</html>
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="vi">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>Clik Agent Widget - Dev</title>
|
|
7
|
+
<style>
|
|
8
|
+
html,
|
|
9
|
+
body {
|
|
10
|
+
height: 100%;
|
|
11
|
+
margin: 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
body {
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
}
|
|
19
|
+
</style>
|
|
20
|
+
<script type="module">
|
|
21
|
+
import Agent from 'http://localhost:3000/web.js'; // Change to from './web.js' to 'https://localhost:5678/web.js'
|
|
22
|
+
Agent.initWidget({
|
|
23
|
+
apiHost: 'https://ci-api.clik.vn/chatbot',
|
|
24
|
+
agentId: 'fe4cf6a9-fa43-4986-bc6f-df67092568c6',
|
|
25
|
+
overrideConfig: {
|
|
26
|
+
chatId: 'f6a855d2-7edc-4fb8-9dd3-74204aa1e2a2',
|
|
27
|
+
skipSuggestion: true,
|
|
28
|
+
overrideConfig: {
|
|
29
|
+
vars: {
|
|
30
|
+
TOUR_CODE: 'TOUR_K9EK76KTX7K4',
|
|
31
|
+
LANGUAGE: 'VN',
|
|
32
|
+
CLIK_GRAPHQL_API: 'https://api.clik.vn/graphql',
|
|
33
|
+
CLIK_VIRTUALTOUR_API: 'https://api.clik.vn/vt360',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
listeners: {
|
|
38
|
+
ON_LINK_CLICK: console.log,
|
|
39
|
+
},
|
|
40
|
+
theme: {
|
|
41
|
+
simplified: true,
|
|
42
|
+
autoCloseAudioPlayer: true,
|
|
43
|
+
hideAudioMetadata: true,
|
|
44
|
+
},
|
|
45
|
+
onLoaded: (tool) => {
|
|
46
|
+
window.tool = tool;
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
</script>
|
|
50
|
+
</head>
|
|
51
|
+
<body>
|
|
52
|
+
<clik-agent-widget></clik-agent-widget>
|
|
53
|
+
</body>
|
|
54
|
+
</html>
|
package/rollup.config.js
CHANGED
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
import resolve from '@rollup/plugin-node-resolve';
|
|
2
|
-
import commonjs from '@rollup/plugin-commonjs';
|
|
3
|
-
import typescript from '@rollup/plugin-typescript';
|
|
4
|
-
import { terser } from 'rollup-plugin-terser';
|
|
5
|
-
import postcss from 'rollup-plugin-postcss';
|
|
6
|
-
import { babel } from '@rollup/plugin-babel';
|
|
7
|
-
import autoprefixer from 'autoprefixer';
|
|
8
|
-
import { typescriptPaths } from 'rollup-plugin-typescript-paths';
|
|
9
|
-
import json from '@rollup/plugin-json';
|
|
10
|
-
import { uglify } from 'rollup-plugin-uglify';
|
|
11
|
-
import replace from 'rollup-plugin-replace';
|
|
12
|
-
import tailwindcss from 'tailwindcss';
|
|
13
|
-
|
|
14
|
-
const extensions = ['.ts', '.tsx', '.js'];
|
|
15
|
-
|
|
16
|
-
const indexConfig = {
|
|
17
|
-
context: 'this',
|
|
18
|
-
onwarn(warning, warn) {
|
|
19
|
-
// Bỏ qua warning về "use client" directive
|
|
20
|
-
if (
|
|
21
|
-
warning.code === 'MODULE_LEVEL_DIRECTIVE' &&
|
|
22
|
-
warning.message.includes('"use client"')
|
|
23
|
-
) {
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
// Hiển thị các warning khác
|
|
27
|
-
warn(warning);
|
|
28
|
-
},
|
|
29
|
-
plugins: [
|
|
30
|
-
resolve({ extensions, browser: true }),
|
|
31
|
-
commonjs(),
|
|
32
|
-
uglify(),
|
|
33
|
-
json(),
|
|
34
|
-
babel({
|
|
35
|
-
babelHelpers: 'bundled',
|
|
36
|
-
exclude: 'node_modules/**',
|
|
37
|
-
extensions,
|
|
38
|
-
}),
|
|
39
|
-
replace({
|
|
40
|
-
'process.env.NODE_ENV': JSON.stringify('production'),
|
|
41
|
-
}),
|
|
42
|
-
postcss({
|
|
43
|
-
plugins: [autoprefixer(), tailwindcss()],
|
|
44
|
-
extract: false,
|
|
45
|
-
modules: false,
|
|
46
|
-
autoModules: false,
|
|
47
|
-
minimize: true,
|
|
48
|
-
inject: false,
|
|
49
|
-
}),
|
|
50
|
-
typescript(),
|
|
51
|
-
typescriptPaths({ preserveExtensions: true }),
|
|
52
|
-
terser({ output: { comments: false } }),
|
|
53
|
-
],
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
const configs = [
|
|
57
|
-
{
|
|
58
|
-
...indexConfig,
|
|
59
|
-
input: './src/web.ts',
|
|
60
|
-
output: {
|
|
61
|
-
file: 'dist/web.js',
|
|
62
|
-
format: 'esm',
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
];
|
|
66
|
-
|
|
67
|
-
export default configs;
|
|
1
|
+
import resolve from '@rollup/plugin-node-resolve';
|
|
2
|
+
import commonjs from '@rollup/plugin-commonjs';
|
|
3
|
+
import typescript from '@rollup/plugin-typescript';
|
|
4
|
+
import { terser } from 'rollup-plugin-terser';
|
|
5
|
+
import postcss from 'rollup-plugin-postcss';
|
|
6
|
+
import { babel } from '@rollup/plugin-babel';
|
|
7
|
+
import autoprefixer from 'autoprefixer';
|
|
8
|
+
import { typescriptPaths } from 'rollup-plugin-typescript-paths';
|
|
9
|
+
import json from '@rollup/plugin-json';
|
|
10
|
+
import { uglify } from 'rollup-plugin-uglify';
|
|
11
|
+
import replace from 'rollup-plugin-replace';
|
|
12
|
+
import tailwindcss from 'tailwindcss';
|
|
13
|
+
|
|
14
|
+
const extensions = ['.ts', '.tsx', '.js'];
|
|
15
|
+
|
|
16
|
+
const indexConfig = {
|
|
17
|
+
context: 'this',
|
|
18
|
+
onwarn(warning, warn) {
|
|
19
|
+
// Bỏ qua warning về "use client" directive
|
|
20
|
+
if (
|
|
21
|
+
warning.code === 'MODULE_LEVEL_DIRECTIVE' &&
|
|
22
|
+
warning.message.includes('"use client"')
|
|
23
|
+
) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
// Hiển thị các warning khác
|
|
27
|
+
warn(warning);
|
|
28
|
+
},
|
|
29
|
+
plugins: [
|
|
30
|
+
resolve({ extensions, browser: true }),
|
|
31
|
+
commonjs(),
|
|
32
|
+
uglify(),
|
|
33
|
+
json(),
|
|
34
|
+
babel({
|
|
35
|
+
babelHelpers: 'bundled',
|
|
36
|
+
exclude: 'node_modules/**',
|
|
37
|
+
extensions,
|
|
38
|
+
}),
|
|
39
|
+
replace({
|
|
40
|
+
'process.env.NODE_ENV': JSON.stringify('production'),
|
|
41
|
+
}),
|
|
42
|
+
postcss({
|
|
43
|
+
plugins: [autoprefixer(), tailwindcss()],
|
|
44
|
+
extract: false,
|
|
45
|
+
modules: false,
|
|
46
|
+
autoModules: false,
|
|
47
|
+
minimize: true,
|
|
48
|
+
inject: false,
|
|
49
|
+
}),
|
|
50
|
+
typescript(),
|
|
51
|
+
typescriptPaths({ preserveExtensions: true }),
|
|
52
|
+
terser({ output: { comments: false } }),
|
|
53
|
+
],
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const configs = [
|
|
57
|
+
{
|
|
58
|
+
...indexConfig,
|
|
59
|
+
input: './src/web.ts',
|
|
60
|
+
output: {
|
|
61
|
+
file: 'dist/web.js',
|
|
62
|
+
format: 'esm',
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
];
|
|
66
|
+
|
|
67
|
+
export default configs;
|