yt-chat-components 1.0.8 → 1.0.9

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yt-chat-components",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "main": "build/static/js/bundle.min.js",
5
5
  "module": "build/static/js/bundle.min.js",
6
6
  "types": "build/static/js/index.d.ts",
@@ -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 { Draggable } from 'react-draggable';
19
+ import Draggable from 'react-draggable';
20
20
 
21
21
 
22
22
  const style=`
package/webpack.config.js CHANGED
@@ -48,4 +48,8 @@ module.exports = {
48
48
  minimize: true,
49
49
  usedExports: false, // 禁用 tree-shaking,避免移除 React
50
50
  },
51
+ externals: {
52
+ react: 'react', // 避免重复打包 React
53
+ 'react-draggable': 'react-draggable', // 声明为外部依赖
54
+ },
51
55
  };