@snack-kit/core 0.3.0 → 0.4.1
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/README.md +8 -0
- package/dist/cjs/index.js +1 -4
- package/dist/es/{index.mjs → index.js} +14 -17
- package/dist/es/index.js.map +1 -0
- package/package.json +1 -1
- package/dist/es/index.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -368,6 +368,14 @@ npm run docs
|
|
|
368
368
|
|
|
369
369
|
## Changelog
|
|
370
370
|
|
|
371
|
+
### 0.4.0
|
|
372
|
+
|
|
373
|
+
**Bug 修复**
|
|
374
|
+
|
|
375
|
+
- 修复 tsup ESM 构建产物扩展名问题:新增 `outExtension: () => ({ js: '.js' })` 配置,强制输出 `dist/es/index.js`,与 `package.json` 的 `exports.import` 路径一致,解决 Vite 等构建工具无法解析 `@snack-kit/core` 入口("Failed to resolve entry")的问题
|
|
376
|
+
|
|
377
|
+
---
|
|
378
|
+
|
|
371
379
|
### 0.2.0
|
|
372
380
|
|
|
373
381
|
**新增**
|
package/dist/cjs/index.js
CHANGED
|
@@ -1455,9 +1455,6 @@ var SnackSetting = /*#__PURE__*/ function(snack_default1) {
|
|
|
1455
1455
|
return SnackSetting1;
|
|
1456
1456
|
}(snack_default);
|
|
1457
1457
|
// src/lib/require.js
|
|
1458
|
-
Object.defineProperty(exports, "__esModule", {
|
|
1459
|
-
value: true
|
|
1460
|
-
});
|
|
1461
1458
|
function _default(global, importMaps) {
|
|
1462
1459
|
function _instanceof(left, right) {
|
|
1463
1460
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
@@ -4823,7 +4820,7 @@ var Loading = function Loading1(props) {
|
|
|
4823
4820
|
// package.json
|
|
4824
4821
|
var package_default = {
|
|
4825
4822
|
name: "@snack-kit/core",
|
|
4826
|
-
version: "0.
|
|
4823
|
+
version: "0.4.1",
|
|
4827
4824
|
main: "dist/cjs/index.js",
|
|
4828
4825
|
module: "dist/es/index.js",
|
|
4829
4826
|
typings: "dist/types/index.d.ts",
|
|
@@ -1358,9 +1358,6 @@ var SnackSetting = /*#__PURE__*/ function(snack_default1) {
|
|
|
1358
1358
|
return SnackSetting1;
|
|
1359
1359
|
}(snack_default);
|
|
1360
1360
|
// src/lib/require.js
|
|
1361
|
-
Object.defineProperty(exports, "__esModule", {
|
|
1362
|
-
value: true
|
|
1363
|
-
});
|
|
1364
1361
|
function _default(global, importMaps) {
|
|
1365
1362
|
function _instanceof(left, right) {
|
|
1366
1363
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
@@ -1710,7 +1707,7 @@ function _default(global, importMaps) {
|
|
|
1710
1707
|
return mod.require = context.makeRequire(mod.map);
|
|
1711
1708
|
}
|
|
1712
1709
|
},
|
|
1713
|
-
"exports": function
|
|
1710
|
+
"exports": function exports(mod) {
|
|
1714
1711
|
mod.usingExports = true;
|
|
1715
1712
|
if (mod.map.isDefine) {
|
|
1716
1713
|
if (mod.exports) {
|
|
@@ -1882,7 +1879,7 @@ function _default(global, importMaps) {
|
|
|
1882
1879
|
if (!this.enabled || this.enabling) {
|
|
1883
1880
|
return;
|
|
1884
1881
|
}
|
|
1885
|
-
var err, cjsModule, id = this.map.id, depExports = this.depExports,
|
|
1882
|
+
var err, cjsModule, id = this.map.id, depExports = this.depExports, exports = this.exports, factory = this.factory;
|
|
1886
1883
|
if (!this.inited) {
|
|
1887
1884
|
if (!hasProp(context.defQueueMap, id)) {
|
|
1888
1885
|
this.fetch();
|
|
@@ -1895,19 +1892,19 @@ function _default(global, importMaps) {
|
|
|
1895
1892
|
if (isFunction(factory)) {
|
|
1896
1893
|
if (this.events.error && this.map.isDefine || req.onError !== defaultOnError) {
|
|
1897
1894
|
try {
|
|
1898
|
-
|
|
1895
|
+
exports = context.execCb(id, factory, depExports, exports);
|
|
1899
1896
|
} catch (e) {
|
|
1900
1897
|
err = e;
|
|
1901
1898
|
}
|
|
1902
1899
|
} else {
|
|
1903
|
-
|
|
1900
|
+
exports = context.execCb(id, factory, depExports, exports);
|
|
1904
1901
|
}
|
|
1905
|
-
if (this.map.isDefine &&
|
|
1902
|
+
if (this.map.isDefine && exports === void 0) {
|
|
1906
1903
|
cjsModule = this.module;
|
|
1907
1904
|
if (cjsModule) {
|
|
1908
|
-
|
|
1905
|
+
exports = cjsModule.exports;
|
|
1909
1906
|
} else if (this.usingExports) {
|
|
1910
|
-
|
|
1907
|
+
exports = this.exports;
|
|
1911
1908
|
}
|
|
1912
1909
|
}
|
|
1913
1910
|
if (err) {
|
|
@@ -1919,11 +1916,11 @@ function _default(global, importMaps) {
|
|
|
1919
1916
|
return onError(this.error = err);
|
|
1920
1917
|
}
|
|
1921
1918
|
} else {
|
|
1922
|
-
|
|
1919
|
+
exports = factory;
|
|
1923
1920
|
}
|
|
1924
|
-
this.exports =
|
|
1921
|
+
this.exports = exports;
|
|
1925
1922
|
if (this.map.isDefine && !this.ignore) {
|
|
1926
|
-
_defined[id] =
|
|
1923
|
+
_defined[id] = exports;
|
|
1927
1924
|
if (req.onResourceLoad) {
|
|
1928
1925
|
var resLoadMaps = [];
|
|
1929
1926
|
each(this.depMaps, function(depMap) {
|
|
@@ -2416,8 +2413,8 @@ function _default(global, importMaps) {
|
|
|
2416
2413
|
* layer in the right sequence.
|
|
2417
2414
|
*
|
|
2418
2415
|
* @private
|
|
2419
|
-
*/ execCb: function execCb(name, callback, args,
|
|
2420
|
-
return callback.apply(
|
|
2416
|
+
*/ execCb: function execCb(name, callback, args, exports, maps) {
|
|
2417
|
+
return callback.apply(exports, args);
|
|
2421
2418
|
},
|
|
2422
2419
|
/**
|
|
2423
2420
|
* callback for script loads, used to check status of loading.
|
|
@@ -4728,7 +4725,7 @@ var Loading = function Loading1(props) {
|
|
|
4728
4725
|
// package.json
|
|
4729
4726
|
var package_default = {
|
|
4730
4727
|
name: "@snack-kit/core",
|
|
4731
|
-
version: "0.
|
|
4728
|
+
version: "0.4.1",
|
|
4732
4729
|
main: "dist/cjs/index.js",
|
|
4733
4730
|
module: "dist/es/index.js",
|
|
4734
4731
|
typings: "dist/types/index.d.ts",
|
|
@@ -4801,4 +4798,4 @@ console.log("\n ____ __ _______ __ __\n / __/__ ___ _____/
|
|
|
4801
4798
|
export { Core, DisplayModule, Error2 as Error, GetDefaultEvents, GetParamsDetails, Loading, ParamsDetails, Snack, SnackSDK, SnackSetting, createReactRoot, src_default as default, enParamsDetails, evalFunc, replaceVars }; /**
|
|
4802
4799
|
* @license Snack RequireJS 2.3.6
|
|
4803
4800
|
*/
|
|
4804
|
-
//# sourceMappingURL=index.
|
|
4801
|
+
//# sourceMappingURL=index.js.map
|