@intlayer/webpack 4.1.8 → 4.1.9

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.
@@ -23,12 +23,14 @@ __export(webpack_plugin_exports, {
23
23
  module.exports = __toCommonJS(webpack_plugin_exports);
24
24
  var import_chokidar = require("@intlayer/chokidar");
25
25
  class IntlayerPlugin {
26
- async apply() {
27
- try {
28
- await (0, import_chokidar.buildAndWatchIntlayer)();
29
- } catch (error) {
30
- console.error("Error in IntlayerPlugin:", error);
31
- }
26
+ async apply(compiler) {
27
+ compiler.hooks.beforeCompile.tapPromise("IntlayerPlugin", async () => {
28
+ try {
29
+ await (0, import_chokidar.buildAndWatchIntlayer)();
30
+ } catch (error) {
31
+ console.error("Error in IntlayerPlugin:", error);
32
+ }
33
+ });
32
34
  }
33
35
  }
34
36
  // Annotate the CommonJS export names for ESM import in node:
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/webpack-plugin.ts"],"sourcesContent":["import { buildAndWatchIntlayer } from '@intlayer/chokidar';\n\n// Watch mode or on time build\nexport class IntlayerPlugin {\n async apply(): Promise<void> {\n try {\n await buildAndWatchIntlayer();\n } catch (error) {\n console.error('Error in IntlayerPlugin:', error);\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAsC;AAG/B,MAAM,eAAe;AAAA,EAC1B,MAAM,QAAuB;AAC3B,QAAI;AACF,gBAAM,uCAAsB;AAAA,IAC9B,SAAS,OAAO;AACd,cAAQ,MAAM,4BAA4B,KAAK;AAAA,IACjD;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/webpack-plugin.ts"],"sourcesContent":["import { buildAndWatchIntlayer } from '@intlayer/chokidar';\nimport { Compiler } from 'webpack';\n\n// Watch mode or on time build\nexport class IntlayerPlugin {\n async apply(compiler: Compiler): Promise<void> {\n compiler.hooks.beforeCompile.tapPromise('IntlayerPlugin', async () => {\n try {\n await buildAndWatchIntlayer();\n } catch (error) {\n console.error('Error in IntlayerPlugin:', error);\n }\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAsC;AAI/B,MAAM,eAAe;AAAA,EAC1B,MAAM,MAAM,UAAmC;AAC7C,aAAS,MAAM,cAAc,WAAW,kBAAkB,YAAY;AACpE,UAAI;AACF,kBAAM,uCAAsB;AAAA,MAC9B,SAAS,OAAO;AACd,gBAAQ,MAAM,4BAA4B,KAAK;AAAA,MACjD;AAAA,IACF,CAAC;AAAA,EACH;AACF;","names":[]}
@@ -1,11 +1,13 @@
1
1
  import { buildAndWatchIntlayer } from "@intlayer/chokidar";
2
2
  class IntlayerPlugin {
3
- async apply() {
4
- try {
5
- await buildAndWatchIntlayer();
6
- } catch (error) {
7
- console.error("Error in IntlayerPlugin:", error);
8
- }
3
+ async apply(compiler) {
4
+ compiler.hooks.beforeCompile.tapPromise("IntlayerPlugin", async () => {
5
+ try {
6
+ await buildAndWatchIntlayer();
7
+ } catch (error) {
8
+ console.error("Error in IntlayerPlugin:", error);
9
+ }
10
+ });
9
11
  }
10
12
  }
11
13
  export {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/webpack-plugin.ts"],"sourcesContent":["import { buildAndWatchIntlayer } from '@intlayer/chokidar';\n\n// Watch mode or on time build\nexport class IntlayerPlugin {\n async apply(): Promise<void> {\n try {\n await buildAndWatchIntlayer();\n } catch (error) {\n console.error('Error in IntlayerPlugin:', error);\n }\n }\n}\n"],"mappings":"AAAA,SAAS,6BAA6B;AAG/B,MAAM,eAAe;AAAA,EAC1B,MAAM,QAAuB;AAC3B,QAAI;AACF,YAAM,sBAAsB;AAAA,IAC9B,SAAS,OAAO;AACd,cAAQ,MAAM,4BAA4B,KAAK;AAAA,IACjD;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/webpack-plugin.ts"],"sourcesContent":["import { buildAndWatchIntlayer } from '@intlayer/chokidar';\nimport { Compiler } from 'webpack';\n\n// Watch mode or on time build\nexport class IntlayerPlugin {\n async apply(compiler: Compiler): Promise<void> {\n compiler.hooks.beforeCompile.tapPromise('IntlayerPlugin', async () => {\n try {\n await buildAndWatchIntlayer();\n } catch (error) {\n console.error('Error in IntlayerPlugin:', error);\n }\n });\n }\n}\n"],"mappings":"AAAA,SAAS,6BAA6B;AAI/B,MAAM,eAAe;AAAA,EAC1B,MAAM,MAAM,UAAmC;AAC7C,aAAS,MAAM,cAAc,WAAW,kBAAkB,YAAY;AACpE,UAAI;AACF,cAAM,sBAAsB;AAAA,MAC9B,SAAS,OAAO;AACd,gBAAQ,MAAM,4BAA4B,KAAK;AAAA,MACjD;AAAA,IACF,CAAC;AAAA,EACH;AACF;","names":[]}
@@ -1,4 +1,5 @@
1
+ import { Compiler } from 'webpack';
1
2
  export declare class IntlayerPlugin {
2
- apply(): Promise<void>;
3
+ apply(compiler: Compiler): Promise<void>;
3
4
  }
4
5
  //# sourceMappingURL=webpack-plugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"webpack-plugin.d.ts","sourceRoot":"","sources":["../../src/webpack-plugin.ts"],"names":[],"mappings":"AAGA,qBAAa,cAAc;IACnB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAO7B"}
1
+ {"version":3,"file":"webpack-plugin.d.ts","sourceRoot":"","sources":["../../src/webpack-plugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGnC,qBAAa,cAAc;IACnB,KAAK,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;CAS/C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlayer/webpack",
3
- "version": "4.1.8",
3
+ "version": "4.1.9",
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": [
@@ -60,11 +60,11 @@
60
60
  "fast-glob": "^3.3.3",
61
61
  "webpack": "^5.97.1",
62
62
  "webpack-dev-server": "^5.2.0",
63
- "@intlayer/chokidar": "4.1.8",
64
- "@intlayer/config": "4.1.8"
63
+ "@intlayer/config": "4.1.9",
64
+ "@intlayer/chokidar": "4.1.9"
65
65
  },
66
66
  "devDependencies": {
67
- "@changesets/cli": "2.27.11",
67
+ "@changesets/cli": "2.27.12",
68
68
  "@types/crypto-js": "^4.2.2",
69
69
  "@types/node": "^22.10.6",
70
70
  "@typescript-eslint/parser": "^8.20.0",
@@ -75,15 +75,15 @@
75
75
  "tsc-alias": "^1.8.10",
76
76
  "tsup": "^8.3.5",
77
77
  "typescript": "^5.7.3",
78
- "@utils/ts-config-types": "1.0.4",
79
78
  "@utils/eslint-config": "1.0.4",
80
79
  "@utils/ts-config": "1.0.4",
81
- "@utils/tsup-config": "1.0.4"
80
+ "@utils/tsup-config": "1.0.4",
81
+ "@utils/ts-config-types": "1.0.4"
82
82
  },
83
83
  "peerDependencies": {
84
84
  "webpack": "^5.96.1",
85
- "@intlayer/chokidar": "4.1.8",
86
- "@intlayer/config": "4.1.8"
85
+ "@intlayer/chokidar": "4.1.9",
86
+ "@intlayer/config": "4.1.9"
87
87
  },
88
88
  "engines": {
89
89
  "node": ">=14.18"