@unpackjs/core 2.3.4 → 2.3.6
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/dist/bundler-config/index.cjs +4 -1
- package/dist/bundler-config/index.d.ts.map +1 -1
- package/dist/bundler-config/index.js +4 -1
- package/dist/bundler-config/jsMinify.cjs +1 -1
- package/dist/bundler-config/jsMinify.js +1 -1
- package/dist/createUnpack.cjs +2 -2
- package/dist/createUnpack.js +2 -2
- package/dist/index.cjs +2 -2
- package/dist/index.js +36 -5
- package/dist/prebundleDeps.cjs +0 -3
- package/dist/prebundleDeps.d.ts.map +1 -1
- package/dist/prebundleDeps.js +0 -3
- package/dist/run/dev.cjs +3 -2
- package/dist/run/dev.d.ts.map +1 -1
- package/dist/run/dev.js +3 -2
- package/package.json +1 -1
|
@@ -245,7 +245,10 @@ var __webpack_exports__ = {};
|
|
|
245
245
|
]
|
|
246
246
|
},
|
|
247
247
|
experiments: {
|
|
248
|
-
lazyCompilation: (null == (_unpackConfig_dev = unpackConfig.dev) ? void 0 : _unpackConfig_dev.lazyCompilation) && (0, external_utils_cjs_namespaceObject.isDevServer)()
|
|
248
|
+
lazyCompilation: (null == (_unpackConfig_dev = unpackConfig.dev) ? void 0 : _unpackConfig_dev.lazyCompilation) && (0, external_utils_cjs_namespaceObject.isDevServer)() && {
|
|
249
|
+
imports: true,
|
|
250
|
+
entries: Boolean(unpackConfig.mpa)
|
|
251
|
+
},
|
|
249
252
|
css: false,
|
|
250
253
|
asyncWebAssembly: true
|
|
251
254
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bundler-config/index.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAyBzE,wBAAsB,gBAAgB,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAAC,oBAAoB,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/bundler-config/index.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAyBzE,wBAAsB,gBAAgB,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAoOhG"}
|
|
@@ -205,7 +205,10 @@ async function getBundlerConfig(unpackConfig) {
|
|
|
205
205
|
]
|
|
206
206
|
},
|
|
207
207
|
experiments: {
|
|
208
|
-
lazyCompilation: (null == (_unpackConfig_dev = unpackConfig.dev) ? void 0 : _unpackConfig_dev.lazyCompilation) && isDevServer()
|
|
208
|
+
lazyCompilation: (null == (_unpackConfig_dev = unpackConfig.dev) ? void 0 : _unpackConfig_dev.lazyCompilation) && isDevServer() && {
|
|
209
|
+
imports: true,
|
|
210
|
+
entries: Boolean(unpackConfig.mpa)
|
|
211
|
+
},
|
|
209
212
|
css: false,
|
|
210
213
|
asyncWebAssembly: true
|
|
211
214
|
},
|
package/dist/createUnpack.cjs
CHANGED
|
@@ -68,7 +68,7 @@ function createUnpack({ cwd = process.cwd(), config, callerName = 'unpack' }) {
|
|
|
68
68
|
};
|
|
69
69
|
const _context = {
|
|
70
70
|
callerName,
|
|
71
|
-
version: "2.3.
|
|
71
|
+
version: "2.3.6"
|
|
72
72
|
};
|
|
73
73
|
let { plugins, bundlerConfig, ...rest } = (0, external_utils_cjs_namespaceObject.mergeConfig)(defaultConfig, config);
|
|
74
74
|
for (const plugin of (0, external_plugin_cjs_namespaceObject.getNormalizedPluginsByHook)('config', plugins))rest = await plugin.config(rest, {
|
|
@@ -85,7 +85,7 @@ function createUnpack({ cwd = process.cwd(), config, callerName = 'unpack' }) {
|
|
|
85
85
|
return {
|
|
86
86
|
build: async ({ watch } = {})=>{
|
|
87
87
|
(0, external_utils_cjs_namespaceObject.setNodeEnv)(watch ? 'development' : 'production');
|
|
88
|
-
console.log(external_colors_cjs_namespaceObject.colors.rainbow(`${callerName} v2.3.
|
|
88
|
+
console.log(external_colors_cjs_namespaceObject.colors.rainbow(`${callerName} v2.3.6`), external_colors_cjs_namespaceObject.colors.green(`building for ${watch ? 'development' : 'production'}...`));
|
|
89
89
|
const config = await resolveConfig();
|
|
90
90
|
(0, index_cjs_namespaceObject.unpackBuild)(config);
|
|
91
91
|
},
|
package/dist/createUnpack.js
CHANGED
|
@@ -42,7 +42,7 @@ function createUnpack({ cwd = process.cwd(), config, callerName = 'unpack' }) {
|
|
|
42
42
|
};
|
|
43
43
|
const _context = {
|
|
44
44
|
callerName,
|
|
45
|
-
version: "2.3.
|
|
45
|
+
version: "2.3.6"
|
|
46
46
|
};
|
|
47
47
|
let { plugins, bundlerConfig, ...rest } = mergeConfig(defaultConfig, config);
|
|
48
48
|
for (const plugin of getNormalizedPluginsByHook('config', plugins))rest = await plugin.config(rest, {
|
|
@@ -59,7 +59,7 @@ function createUnpack({ cwd = process.cwd(), config, callerName = 'unpack' }) {
|
|
|
59
59
|
return {
|
|
60
60
|
build: async ({ watch } = {})=>{
|
|
61
61
|
setNodeEnv(watch ? 'development' : 'production');
|
|
62
|
-
console.log(colors.rainbow(`${callerName} v2.3.
|
|
62
|
+
console.log(colors.rainbow(`${callerName} v2.3.6`), colors.green(`building for ${watch ? 'development' : 'production'}...`));
|
|
63
63
|
const config = await resolveConfig();
|
|
64
64
|
unpackBuild(config);
|
|
65
65
|
},
|
package/dist/index.cjs
CHANGED
|
@@ -21,7 +21,7 @@ var __webpack_modules__ = {
|
|
|
21
21
|
"./logger": function(module) {
|
|
22
22
|
module.exports = require("./logger.cjs");
|
|
23
23
|
},
|
|
24
|
-
"
|
|
24
|
+
"./types/index": function(module) {
|
|
25
25
|
module.exports = require("./types/index.cjs");
|
|
26
26
|
},
|
|
27
27
|
"./utils": function(module) {
|
|
@@ -170,7 +170,7 @@ var __webpack_exports__ = {};
|
|
|
170
170
|
return _logger__WEBPACK_IMPORTED_MODULE_9__[key];
|
|
171
171
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
172
172
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
173
|
-
var _types_index__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("
|
|
173
|
+
var _types_index__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("./types/index");
|
|
174
174
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
175
175
|
for(var __WEBPACK_IMPORT_KEY__ in _types_index__WEBPACK_IMPORTED_MODULE_10__)if ([
|
|
176
176
|
"webpack",
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import 'module';
|
|
2
2
|
/*#__PURE__*/ import.meta.url;
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
3
|
+
import * as __WEBPACK_EXTERNAL_MODULE__types_index_js_63ede62f__ from "./types/index.js";
|
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE__rspack_core_e0096ff7__ from "@rspack/core";
|
|
5
|
+
import * as __WEBPACK_EXTERNAL_MODULE_html_webpack_plugin_e07f62c9__ from "html-webpack-plugin";
|
|
6
|
+
import * as __WEBPACK_EXTERNAL_MODULE_webpack__ from "webpack";
|
|
6
7
|
export * from "./colors.js";
|
|
7
8
|
export * from "./config.js";
|
|
8
9
|
export * from "./constants.js";
|
|
@@ -10,7 +11,37 @@ export * from "./createUnpack.js";
|
|
|
10
11
|
export * from "./fs.js";
|
|
11
12
|
export * from "./global.js";
|
|
12
13
|
export * from "./logger.js";
|
|
13
|
-
export * from "./types/index.js";
|
|
14
14
|
export * from "./utils.js";
|
|
15
15
|
export * from "./watchFiles.js";
|
|
16
|
-
|
|
16
|
+
var __webpack_modules__ = {
|
|
17
|
+
"src/types/index": function(module) {
|
|
18
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__types_index_js_63ede62f__;
|
|
19
|
+
},
|
|
20
|
+
"@rspack/core": function(module) {
|
|
21
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__rspack_core_e0096ff7__;
|
|
22
|
+
},
|
|
23
|
+
"html-webpack-plugin": function(module) {
|
|
24
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE_html_webpack_plugin_e07f62c9__;
|
|
25
|
+
},
|
|
26
|
+
webpack: function(module) {
|
|
27
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE_webpack__;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
var __webpack_module_cache__ = {};
|
|
31
|
+
function __webpack_require__(moduleId) {
|
|
32
|
+
var cachedModule = __webpack_module_cache__[moduleId];
|
|
33
|
+
if (void 0 !== cachedModule) return cachedModule.exports;
|
|
34
|
+
var module = __webpack_module_cache__[moduleId] = {
|
|
35
|
+
exports: {}
|
|
36
|
+
};
|
|
37
|
+
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
38
|
+
return module.exports;
|
|
39
|
+
}
|
|
40
|
+
var core_ = __webpack_require__("@rspack/core");
|
|
41
|
+
var external_html_webpack_plugin_ = __webpack_require__("html-webpack-plugin");
|
|
42
|
+
var external_webpack_ = __webpack_require__("webpack");
|
|
43
|
+
__webpack_require__("src/types/index");
|
|
44
|
+
var __webpack_exports__HtmlWebpackPlugin = external_html_webpack_plugin_["default"];
|
|
45
|
+
var __webpack_exports__rspack = core_.rspack;
|
|
46
|
+
var __webpack_exports__webpack = external_webpack_["default"];
|
|
47
|
+
export { __webpack_exports__HtmlWebpackPlugin as HtmlWebpackPlugin, __webpack_exports__rspack as rspack, __webpack_exports__webpack as webpack };
|
package/dist/prebundleDeps.cjs
CHANGED
|
@@ -70,7 +70,6 @@ const getExternalLibraryName = (pkgName)=>{
|
|
|
70
70
|
const externalAlias = {
|
|
71
71
|
react: 'React',
|
|
72
72
|
'react-dom': 'ReactDOM',
|
|
73
|
-
'react-router': 'ReactRouter',
|
|
74
73
|
'react-router-dom': 'ReactRouterDOM'
|
|
75
74
|
};
|
|
76
75
|
return externalAlias[pkgName] || pkgName;
|
|
@@ -228,7 +227,6 @@ const prebundleDeps = async ({ unpackConfig })=>{
|
|
|
228
227
|
externals: {
|
|
229
228
|
react: getExternalValue('react'),
|
|
230
229
|
'react-dom': getExternalValue('react-dom'),
|
|
231
|
-
'react-router': getExternalValue('react-router'),
|
|
232
230
|
'react-router-dom': getExternalValue('react-router-dom')
|
|
233
231
|
}
|
|
234
232
|
});
|
|
@@ -294,7 +292,6 @@ const prebundleDeps = async ({ unpackConfig })=>{
|
|
|
294
292
|
const preDeps = [
|
|
295
293
|
'react',
|
|
296
294
|
'react-dom',
|
|
297
|
-
'react-router',
|
|
298
295
|
'react-router-dom'
|
|
299
296
|
];
|
|
300
297
|
const serverPath = `//localhost:${port}/${CACHE_DIR}/${relativePath}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prebundleDeps.d.ts","sourceRoot":"","sources":["../src/prebundleDeps.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"prebundleDeps.d.ts","sourceRoot":"","sources":["../src/prebundleDeps.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAyE3C,eAAO,MAAM,aAAa,GAAU,mBAEjC;IACD,YAAY,EAAE,YAAY,CAAA;CAC3B,KAAG,OAAO,CAAC,YAAY,CA6RvB,CAAA"}
|
package/dist/prebundleDeps.js
CHANGED
|
@@ -30,7 +30,6 @@ const getExternalLibraryName = (pkgName)=>{
|
|
|
30
30
|
const externalAlias = {
|
|
31
31
|
react: 'React',
|
|
32
32
|
'react-dom': 'ReactDOM',
|
|
33
|
-
'react-router': 'ReactRouter',
|
|
34
33
|
'react-router-dom': 'ReactRouterDOM'
|
|
35
34
|
};
|
|
36
35
|
return externalAlias[pkgName] || pkgName;
|
|
@@ -188,7 +187,6 @@ const prebundleDeps = async ({ unpackConfig })=>{
|
|
|
188
187
|
externals: {
|
|
189
188
|
react: getExternalValue('react'),
|
|
190
189
|
'react-dom': getExternalValue('react-dom'),
|
|
191
|
-
'react-router': getExternalValue('react-router'),
|
|
192
190
|
'react-router-dom': getExternalValue('react-router-dom')
|
|
193
191
|
}
|
|
194
192
|
});
|
|
@@ -254,7 +252,6 @@ const prebundleDeps = async ({ unpackConfig })=>{
|
|
|
254
252
|
const preDeps = [
|
|
255
253
|
'react',
|
|
256
254
|
'react-dom',
|
|
257
|
-
'react-router',
|
|
258
255
|
'react-router-dom'
|
|
259
256
|
];
|
|
260
257
|
const serverPath = `//localhost:${port}/${CACHE_DIR}/${relativePath}`;
|
package/dist/run/dev.cjs
CHANGED
|
@@ -87,9 +87,10 @@ async function unpackDev(originalUnpackConfig) {
|
|
|
87
87
|
};
|
|
88
88
|
const server = new (external_webpack_dev_server_default())(devServerOptions, compiler);
|
|
89
89
|
await server.start();
|
|
90
|
-
|
|
91
|
-
external_logger_cjs_namespaceObject.logger.greet(` ${external_colors_cjs_namespaceObject.colors.green(`${external_colors_cjs_namespaceObject.colors.bold(unpackConfig._context.callerName.toUpperCase())} v2.3.4`)} ${external_colors_cjs_namespaceObject.colors.dim(`ready in ${external_colors_cjs_namespaceObject.colors.reset(Math.ceil(performance.now() - global.__unpack_start_time))}ms`)}\n`);
|
|
90
|
+
external_logger_cjs_namespaceObject.logger.greet(` ${external_colors_cjs_namespaceObject.colors.green(`${external_colors_cjs_namespaceObject.colors.bold(unpackConfig._context.callerName.toUpperCase())} v2.3.6`)} ${external_colors_cjs_namespaceObject.colors.dim(`ready in ${external_colors_cjs_namespaceObject.colors.reset(Math.ceil(performance.now() - global.__unpack_start_time))}ms`)}\n`);
|
|
92
91
|
printAddressUrls(port);
|
|
92
|
+
external_logger_cjs_namespaceObject.logger.wait('building...');
|
|
93
|
+
global.__unpack_dev_server_started = true;
|
|
93
94
|
external_global_cjs_namespaceObject.restartCleaners.push(async ()=>await server.stop(), ()=>new Promise((resolve)=>compiler.close(()=>resolve())), ()=>{
|
|
94
95
|
global.__unpack_dev_server_started = false;
|
|
95
96
|
});
|
package/dist/run/dev.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/run/dev.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAwB,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAMzE,wBAAsB,SAAS,CAAC,oBAAoB,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/run/dev.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAwB,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAMzE,wBAAsB,SAAS,CAAC,oBAAoB,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAqEjF"}
|
package/dist/run/dev.js
CHANGED
|
@@ -50,9 +50,10 @@ async function unpackDev(originalUnpackConfig) {
|
|
|
50
50
|
};
|
|
51
51
|
const server = new webpack_dev_server(devServerOptions, compiler);
|
|
52
52
|
await server.start();
|
|
53
|
-
|
|
54
|
-
logger.greet(` ${colors.green(`${colors.bold(unpackConfig._context.callerName.toUpperCase())} v2.3.4`)} ${colors.dim(`ready in ${colors.reset(Math.ceil(performance.now() - global.__unpack_start_time))}ms`)}\n`);
|
|
53
|
+
logger.greet(` ${colors.green(`${colors.bold(unpackConfig._context.callerName.toUpperCase())} v2.3.6`)} ${colors.dim(`ready in ${colors.reset(Math.ceil(performance.now() - global.__unpack_start_time))}ms`)}\n`);
|
|
55
54
|
printAddressUrls(port);
|
|
55
|
+
logger.wait('building...');
|
|
56
|
+
global.__unpack_dev_server_started = true;
|
|
56
57
|
restartCleaners.push(async ()=>await server.stop(), ()=>new Promise((resolve)=>compiler.close(()=>resolve())), ()=>{
|
|
57
58
|
global.__unpack_dev_server_started = false;
|
|
58
59
|
});
|