@intlayer/webpack 8.4.9 → 8.5.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.
@@ -1,5 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
  const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
3
+ let _intlayer_config_node = require("@intlayer/config/node");
3
4
  let _intlayer_chokidar_build = require("@intlayer/chokidar/build");
4
5
  let _intlayer_chokidar_watcher = require("@intlayer/chokidar/watcher");
5
6
  let _intlayer_config_logger = require("@intlayer/config/logger");
@@ -9,7 +10,7 @@ var IntlayerPlugin = class {
9
10
  isWatching = false;
10
11
  configuration;
11
12
  constructor(configuration) {
12
- this.configuration = configuration;
13
+ this.configuration = configuration ?? (0, _intlayer_config_node.getConfiguration)();
13
14
  }
14
15
  async apply(compiler) {
15
16
  if (this.configuration.content.watch) (0, _intlayer_chokidar_watcher.watch)({ configuration: this.configuration });
@@ -1 +1 @@
1
- {"version":3,"file":"webpack-plugin.cjs","names":[],"sources":["../../src/webpack-plugin.ts"],"sourcesContent":["import { prepareIntlayer } from '@intlayer/chokidar/build';\nimport { watch } from '@intlayer/chokidar/watcher';\nimport { logger } from '@intlayer/config/logger';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport type { Compiler } from 'webpack';\n\n// Watch mode or on time build\nexport class IntlayerPlugin {\n private isWatching = false; // Flag to ensure we only start the watcher after the first build\n private configuration;\n\n constructor(configuration: IntlayerConfig) {\n this.configuration = configuration;\n }\n\n async apply(compiler: Compiler): Promise<void> {\n if (this.configuration.content.watch) {\n // Start watching (assuming watch is also async)\n watch({ configuration: this.configuration });\n }\n\n compiler.hooks.beforeCompile.tapPromise('IntlayerPlugin', async () => {\n if (!this.isWatching) {\n try {\n await prepareIntlayer(this.configuration);\n this.isWatching = true;\n } catch (error) {\n logger(`Error in IntlayerPlugin: ${error}`, {\n level: 'error',\n });\n }\n }\n });\n }\n}\n"],"mappings":";;;;;;;AAOA,IAAa,iBAAb,MAA4B;CAC1B,AAAQ,aAAa;CACrB,AAAQ;CAER,YAAY,eAA+B;AACzC,OAAK,gBAAgB;;CAGvB,MAAM,MAAM,UAAmC;AAC7C,MAAI,KAAK,cAAc,QAAQ,MAE7B,uCAAM,EAAE,eAAe,KAAK,eAAe,CAAC;AAG9C,WAAS,MAAM,cAAc,WAAW,kBAAkB,YAAY;AACpE,OAAI,CAAC,KAAK,WACR,KAAI;AACF,wDAAsB,KAAK,cAAc;AACzC,SAAK,aAAa;YACX,OAAO;AACd,wCAAO,4BAA4B,SAAS,EAC1C,OAAO,SACR,CAAC;;IAGN"}
1
+ {"version":3,"file":"webpack-plugin.cjs","names":[],"sources":["../../src/webpack-plugin.ts"],"sourcesContent":["import { prepareIntlayer } from '@intlayer/chokidar/build';\nimport { watch } from '@intlayer/chokidar/watcher';\nimport { logger } from '@intlayer/config/logger';\nimport { getConfiguration } from '@intlayer/config/node';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport type { Compiler } from 'webpack';\n\n// Watch mode or on time build\nexport class IntlayerPlugin {\n private isWatching = false; // Flag to ensure we only start the watcher after the first build\n private configuration;\n\n constructor(configuration?: IntlayerConfig) {\n this.configuration = configuration ?? getConfiguration();\n }\n\n async apply(compiler: Compiler): Promise<void> {\n if (this.configuration.content.watch) {\n // Start watching (assuming watch is also async)\n watch({ configuration: this.configuration });\n }\n\n compiler.hooks.beforeCompile.tapPromise('IntlayerPlugin', async () => {\n if (!this.isWatching) {\n try {\n await prepareIntlayer(this.configuration);\n this.isWatching = true;\n } catch (error) {\n logger(`Error in IntlayerPlugin: ${error}`, {\n level: 'error',\n });\n }\n }\n });\n }\n}\n"],"mappings":";;;;;;;;AAQA,IAAa,iBAAb,MAA4B;CAC1B,AAAQ,aAAa;CACrB,AAAQ;CAER,YAAY,eAAgC;AAC1C,OAAK,gBAAgB,8DAAmC;;CAG1D,MAAM,MAAM,UAAmC;AAC7C,MAAI,KAAK,cAAc,QAAQ,MAE7B,uCAAM,EAAE,eAAe,KAAK,eAAe,CAAC;AAG9C,WAAS,MAAM,cAAc,WAAW,kBAAkB,YAAY;AACpE,OAAI,CAAC,KAAK,WACR,KAAI;AACF,wDAAsB,KAAK,cAAc;AACzC,SAAK,aAAa;YACX,OAAO;AACd,wCAAO,4BAA4B,SAAS,EAC1C,OAAO,SACR,CAAC;;IAGN"}
@@ -1,3 +1,4 @@
1
+ import { getConfiguration } from "@intlayer/config/node";
1
2
  import { prepareIntlayer } from "@intlayer/chokidar/build";
2
3
  import { watch } from "@intlayer/chokidar/watcher";
3
4
  import { logger } from "@intlayer/config/logger";
@@ -7,7 +8,7 @@ var IntlayerPlugin = class {
7
8
  isWatching = false;
8
9
  configuration;
9
10
  constructor(configuration) {
10
- this.configuration = configuration;
11
+ this.configuration = configuration ?? getConfiguration();
11
12
  }
12
13
  async apply(compiler) {
13
14
  if (this.configuration.content.watch) watch({ configuration: this.configuration });
@@ -1 +1 @@
1
- {"version":3,"file":"webpack-plugin.mjs","names":[],"sources":["../../src/webpack-plugin.ts"],"sourcesContent":["import { prepareIntlayer } from '@intlayer/chokidar/build';\nimport { watch } from '@intlayer/chokidar/watcher';\nimport { logger } from '@intlayer/config/logger';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport type { Compiler } from 'webpack';\n\n// Watch mode or on time build\nexport class IntlayerPlugin {\n private isWatching = false; // Flag to ensure we only start the watcher after the first build\n private configuration;\n\n constructor(configuration: IntlayerConfig) {\n this.configuration = configuration;\n }\n\n async apply(compiler: Compiler): Promise<void> {\n if (this.configuration.content.watch) {\n // Start watching (assuming watch is also async)\n watch({ configuration: this.configuration });\n }\n\n compiler.hooks.beforeCompile.tapPromise('IntlayerPlugin', async () => {\n if (!this.isWatching) {\n try {\n await prepareIntlayer(this.configuration);\n this.isWatching = true;\n } catch (error) {\n logger(`Error in IntlayerPlugin: ${error}`, {\n level: 'error',\n });\n }\n }\n });\n }\n}\n"],"mappings":";;;;;AAOA,IAAa,iBAAb,MAA4B;CAC1B,AAAQ,aAAa;CACrB,AAAQ;CAER,YAAY,eAA+B;AACzC,OAAK,gBAAgB;;CAGvB,MAAM,MAAM,UAAmC;AAC7C,MAAI,KAAK,cAAc,QAAQ,MAE7B,OAAM,EAAE,eAAe,KAAK,eAAe,CAAC;AAG9C,WAAS,MAAM,cAAc,WAAW,kBAAkB,YAAY;AACpE,OAAI,CAAC,KAAK,WACR,KAAI;AACF,UAAM,gBAAgB,KAAK,cAAc;AACzC,SAAK,aAAa;YACX,OAAO;AACd,WAAO,4BAA4B,SAAS,EAC1C,OAAO,SACR,CAAC;;IAGN"}
1
+ {"version":3,"file":"webpack-plugin.mjs","names":[],"sources":["../../src/webpack-plugin.ts"],"sourcesContent":["import { prepareIntlayer } from '@intlayer/chokidar/build';\nimport { watch } from '@intlayer/chokidar/watcher';\nimport { logger } from '@intlayer/config/logger';\nimport { getConfiguration } from '@intlayer/config/node';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport type { Compiler } from 'webpack';\n\n// Watch mode or on time build\nexport class IntlayerPlugin {\n private isWatching = false; // Flag to ensure we only start the watcher after the first build\n private configuration;\n\n constructor(configuration?: IntlayerConfig) {\n this.configuration = configuration ?? getConfiguration();\n }\n\n async apply(compiler: Compiler): Promise<void> {\n if (this.configuration.content.watch) {\n // Start watching (assuming watch is also async)\n watch({ configuration: this.configuration });\n }\n\n compiler.hooks.beforeCompile.tapPromise('IntlayerPlugin', async () => {\n if (!this.isWatching) {\n try {\n await prepareIntlayer(this.configuration);\n this.isWatching = true;\n } catch (error) {\n logger(`Error in IntlayerPlugin: ${error}`, {\n level: 'error',\n });\n }\n }\n });\n }\n}\n"],"mappings":";;;;;;AAQA,IAAa,iBAAb,MAA4B;CAC1B,AAAQ,aAAa;CACrB,AAAQ;CAER,YAAY,eAAgC;AAC1C,OAAK,gBAAgB,iBAAiB,kBAAkB;;CAG1D,MAAM,MAAM,UAAmC;AAC7C,MAAI,KAAK,cAAc,QAAQ,MAE7B,OAAM,EAAE,eAAe,KAAK,eAAe,CAAC;AAG9C,WAAS,MAAM,cAAc,WAAW,kBAAkB,YAAY;AACpE,OAAI,CAAC,KAAK,WACR,KAAI;AACF,UAAM,gBAAgB,KAAK,cAAc;AACzC,SAAK,aAAa;YACX,OAAO;AACd,WAAO,4BAA4B,SAAS,EAC1C,OAAO,SACR,CAAC;;IAGN"}
@@ -5,7 +5,7 @@ import { Compiler } from "webpack";
5
5
  declare class IntlayerPlugin {
6
6
  private isWatching;
7
7
  private configuration;
8
- constructor(configuration: IntlayerConfig);
8
+ constructor(configuration?: IntlayerConfig);
9
9
  apply(compiler: Compiler): Promise<void>;
10
10
  }
11
11
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"webpack-plugin.d.ts","names":[],"sources":["../../src/webpack-plugin.ts"],"mappings":";;;;cAOa,cAAA;EAAA,QACH,UAAA;EAAA,QACA,aAAA;cAEI,aAAA,EAAe,cAAA;EAIrB,KAAA,CAAM,QAAA,EAAU,QAAA,GAAW,OAAA;AAAA"}
1
+ {"version":3,"file":"webpack-plugin.d.ts","names":[],"sources":["../../src/webpack-plugin.ts"],"mappings":";;;;cAQa,cAAA;EAAA,QACH,UAAA;EAAA,QACA,aAAA;cAEI,aAAA,GAAgB,cAAA;EAItB,KAAA,CAAM,QAAA,EAAU,QAAA,GAAW,OAAA;AAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlayer/webpack",
3
- "version": "8.4.9",
3
+ "version": "8.5.0",
4
4
  "private": false,
5
5
  "description": "Webpack plugin for seamless integration with Intlayer, enhancing JavaScript apps built with React, Next.js and more.",
6
6
  "keywords": [
@@ -77,9 +77,9 @@
77
77
  "watch": "webpack --config ./webpack.config.ts --watch"
78
78
  },
79
79
  "dependencies": {
80
- "@intlayer/chokidar": "8.4.9",
81
- "@intlayer/config": "8.4.9",
82
- "@intlayer/types": "8.4.9",
80
+ "@intlayer/chokidar": "8.5.0",
81
+ "@intlayer/config": "8.5.0",
82
+ "@intlayer/types": "8.5.0",
83
83
  "fast-glob": "3.3.3",
84
84
  "webpack": "5.105.4",
85
85
  "webpack-dev-server": "5.2.3"
@@ -91,8 +91,8 @@
91
91
  "@utils/tsdown-config": "1.0.4",
92
92
  "rimraf": "6.1.3",
93
93
  "tsdown": "0.21.4",
94
- "typescript": "5.9.3",
95
- "vitest": "4.1.0"
94
+ "typescript": "6.0.2",
95
+ "vitest": "4.1.1"
96
96
  },
97
97
  "peerDependencies": {
98
98
  "webpack": "5.105.4"