yt-chat-components 1.0.8 → 1.1.0
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/package.json
CHANGED
|
@@ -16,7 +16,7 @@ import icon_history_upload from '../../assets/aicenter/icon_history_upload.png';
|
|
|
16
16
|
import icon_history_headerbg from '../../assets/aicenter/icon_history_headerbg.png';
|
|
17
17
|
import icon_history_add from '../../assets/aicenter/icon_history_add.png';
|
|
18
18
|
import ChatWidget from "../chatWidget";
|
|
19
|
-
import
|
|
19
|
+
import Draggable from 'react-draggable';
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
const style=`
|
package/webpack.config.js
CHANGED
|
@@ -6,9 +6,11 @@ module.exports = {
|
|
|
6
6
|
output: {
|
|
7
7
|
filename: "bundle.min.js",
|
|
8
8
|
path: path.resolve(__dirname, "build/static/js"),
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
library: {
|
|
10
|
+
name: "YtChatComponents", // 定义全局命名空间
|
|
11
|
+
type: "umd", // 保持 UMD 格式
|
|
12
|
+
},
|
|
13
|
+
globalObject: "this", // 兼容 Node 和浏览器
|
|
12
14
|
},
|
|
13
15
|
module: {
|
|
14
16
|
rules: [
|
|
@@ -48,4 +50,18 @@ module.exports = {
|
|
|
48
50
|
minimize: true,
|
|
49
51
|
usedExports: false, // 禁用 tree-shaking,避免移除 React
|
|
50
52
|
},
|
|
53
|
+
externals: {
|
|
54
|
+
react: {
|
|
55
|
+
commonjs: "react",
|
|
56
|
+
commonjs2: "react",
|
|
57
|
+
amd: "react",
|
|
58
|
+
root: "React",
|
|
59
|
+
},
|
|
60
|
+
"react-draggable": {
|
|
61
|
+
commonjs: "react-draggable",
|
|
62
|
+
commonjs2: "react-draggable",
|
|
63
|
+
amd: "react-draggable",
|
|
64
|
+
root: "ReactDraggable",
|
|
65
|
+
},
|
|
66
|
+
},
|
|
51
67
|
};
|