@snack-kit/core 0.2.0 → 0.3.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.
@@ -1240,10 +1240,6 @@ interface SnackReactRoot {
1240
1240
  * 运行时检测 React 主版本号,返回对应的挂载/卸载接口。
1241
1241
  * - React 18+:使用 `createRoot`(react-dom/client)
1242
1242
  * - React 17:使用旧版 `ReactDOM.render` / `unmountComponentAtNode`
1243
- *
1244
- * 注意:通过变量存储模块名,绕过宿主项目 webpack 的静态模块解析。
1245
- * webpack 仅解析 require() 的字符串字面量参数,变量形式不会被静态分析,
1246
- * 从而避免 React 17 宿主环境因 react-dom/client 不存在而报 "Module not found"。
1247
1243
  */
1248
1244
  declare function createReactRoot(container: Element): SnackReactRoot;
1249
1245
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snack-kit/core",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/es/index.js",
6
6
  "typings": "dist/types/index.d.ts",
@@ -43,13 +43,13 @@
43
43
  "@swc/core": "^1.15.18",
44
44
  "@types/react": "^19.2.7",
45
45
  "@types/react-dom": "^19.2.3",
46
- "react": "^19.2.0",
47
- "react-dom": "^19.2.0",
48
46
  "@vitest/coverage-v8": "^2.0.0",
49
47
  "css-loader": "^7.1.4",
50
48
  "html-webpack-plugin": "^5.6.6",
51
49
  "jsdom": "^24.0.0",
52
50
  "minimist": "^1.2.8",
51
+ "react": "^19.2.0",
52
+ "react-dom": "^19.2.0",
53
53
  "rimraf": "^5.0.0",
54
54
  "sass": "^1.97.3",
55
55
  "sass-loader": "^16.0.7",