@unpackjs/core 2.3.5 → 2.3.7

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.
@@ -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,CAgOhG"}
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
  },
@@ -55,7 +55,7 @@ class JsMinifyPlugin {
55
55
  apply(compiler) {
56
56
  const meta = JSON.stringify({
57
57
  name: PLUGIN_NAME,
58
- version: "2.3.5",
58
+ version: "2.3.7",
59
59
  options: this.minifyOptions
60
60
  });
61
61
  compiler.hooks.compilation.tap(PLUGIN_NAME, (compilation)=>{
@@ -19,7 +19,7 @@ class JsMinifyPlugin {
19
19
  apply(compiler) {
20
20
  const meta = JSON.stringify({
21
21
  name: PLUGIN_NAME,
22
- version: "2.3.5",
22
+ version: "2.3.7",
23
23
  options: this.minifyOptions
24
24
  });
25
25
  compiler.hooks.compilation.tap(PLUGIN_NAME, (compilation)=>{
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/bundler-config/progress/helpers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,MAAM,cAAc,CAAA;AA4C3C,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,IAAI,EAAE,MAAM,QAgBlE;AAED,wBAAsB,WAAW,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,iBA4D/E"}
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/bundler-config/progress/helpers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,MAAM,cAAc,CAAA;AA4C3C,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,IAAI,EAAE,MAAM,QAclE;AAED,wBAAsB,WAAW,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,iBA4D/E"}
@@ -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.5"
71
+ version: "2.3.7"
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.5`), external_colors_cjs_namespaceObject.colors.green(`building for ${watch ? 'development' : 'production'}...`));
88
+ console.log(external_colors_cjs_namespaceObject.colors.rainbow(`${callerName} v2.3.7`), 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
  },
@@ -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.5"
45
+ version: "2.3.7"
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.5`), colors.green(`building for ${watch ? 'development' : 'production'}...`));
62
+ console.log(colors.rainbow(`${callerName} v2.3.7`), colors.green(`building for ${watch ? 'development' : 'production'}...`));
63
63
  const config = await resolveConfig();
64
64
  unpackBuild(config);
65
65
  },
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
- global.__unpack_dev_server_started = true;
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.5`)} ${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.7`)} ${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
  });
@@ -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,CAoEjF"}
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
- global.__unpack_dev_server_started = true;
54
- logger.greet(` ${colors.green(`${colors.bold(unpackConfig._context.callerName.toUpperCase())} v2.3.5`)} ${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.7`)} ${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
  });
@@ -79,7 +79,7 @@ class TypedCssModulesPlugin {
79
79
  this.generateCssTypings(this.useIncremental).catch((err)=>{
80
80
  external_logger_cjs_namespaceObject.logger.error(err.toString());
81
81
  }).finally(()=>{
82
- this.useIncremental = false;
82
+ this.useIncremental = true;
83
83
  });
84
84
  }, 100);
85
85
  });
@@ -42,7 +42,7 @@ class TypedCssModulesPlugin {
42
42
  this.generateCssTypings(this.useIncremental).catch((err)=>{
43
43
  logger.error(err.toString());
44
44
  }).finally(()=>{
45
- this.useIncremental = false;
45
+ this.useIncremental = true;
46
46
  });
47
47
  }, 100);
48
48
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unpackjs/core",
3
- "version": "2.3.5",
3
+ "version": "2.3.7",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "exports": {