@intlayer/webpack 5.8.1 → 6.0.0-canary.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.
|
@@ -27,15 +27,11 @@ class IntlayerPlugin {
|
|
|
27
27
|
isWatching = false;
|
|
28
28
|
// Flag to ensure we only start the watcher after the first build
|
|
29
29
|
configuration = (0, import_config.getConfiguration)();
|
|
30
|
-
eventListener;
|
|
31
30
|
async apply(compiler) {
|
|
32
31
|
if (this.configuration.content.watch) {
|
|
33
32
|
(0, import_chokidar.watch)(this.configuration);
|
|
34
33
|
}
|
|
35
34
|
compiler.hooks.beforeCompile.tapPromise("IntlayerPlugin", async () => {
|
|
36
|
-
if (this.configuration.editor.hotReload) {
|
|
37
|
-
this.eventListener = await (0, import_chokidar.checkDictionaryChanges)();
|
|
38
|
-
}
|
|
39
35
|
if (!this.isWatching) {
|
|
40
36
|
try {
|
|
41
37
|
await (0, import_chokidar.prepareIntlayer)(this.configuration);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/webpack-plugin.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../src/webpack-plugin.ts"],"sourcesContent":["import { prepareIntlayer, watch } from '@intlayer/chokidar';\nimport { getConfiguration, logger } from '@intlayer/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 = getConfiguration();\n\n async apply(compiler: Compiler): Promise<void> {\n if (this.configuration.content.watch) {\n // Start watching (assuming watch is also async)\n watch(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":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAuC;AACvC,oBAAyC;AAIlC,MAAM,eAAe;AAAA,EAClB,aAAa;AAAA;AAAA,EACb,oBAAgB,gCAAiB;AAAA,EAEzC,MAAM,MAAM,UAAmC;AAC7C,QAAI,KAAK,cAAc,QAAQ,OAAO;AAEpC,iCAAM,KAAK,aAAa;AAAA,IAC1B;AAEA,aAAS,MAAM,cAAc,WAAW,kBAAkB,YAAY;AACpE,UAAI,CAAC,KAAK,YAAY;AACpB,YAAI;AACF,oBAAM,iCAAgB,KAAK,aAAa;AACxC,eAAK,aAAa;AAAA,QACpB,SAAS,OAAO;AACd,oCAAO,4BAA4B,KAAK,IAAI;AAAA,YAC1C,OAAO;AAAA,UACT,CAAC;AAAA,QACH;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AACF;","names":[]}
|
|
@@ -1,22 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
checkDictionaryChanges,
|
|
3
|
-
prepareIntlayer,
|
|
4
|
-
watch
|
|
5
|
-
} from "@intlayer/chokidar";
|
|
1
|
+
import { prepareIntlayer, watch } from "@intlayer/chokidar";
|
|
6
2
|
import { getConfiguration, logger } from "@intlayer/config";
|
|
7
3
|
class IntlayerPlugin {
|
|
8
4
|
isWatching = false;
|
|
9
5
|
// Flag to ensure we only start the watcher after the first build
|
|
10
6
|
configuration = getConfiguration();
|
|
11
|
-
eventListener;
|
|
12
7
|
async apply(compiler) {
|
|
13
8
|
if (this.configuration.content.watch) {
|
|
14
9
|
watch(this.configuration);
|
|
15
10
|
}
|
|
16
11
|
compiler.hooks.beforeCompile.tapPromise("IntlayerPlugin", async () => {
|
|
17
|
-
if (this.configuration.editor.hotReload) {
|
|
18
|
-
this.eventListener = await checkDictionaryChanges();
|
|
19
|
-
}
|
|
20
12
|
if (!this.isWatching) {
|
|
21
13
|
try {
|
|
22
14
|
await prepareIntlayer(this.configuration);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/webpack-plugin.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../src/webpack-plugin.ts"],"sourcesContent":["import { prepareIntlayer, watch } from '@intlayer/chokidar';\nimport { getConfiguration, logger } from '@intlayer/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 = getConfiguration();\n\n async apply(compiler: Compiler): Promise<void> {\n if (this.configuration.content.watch) {\n // Start watching (assuming watch is also async)\n watch(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":"AAAA,SAAS,iBAAiB,aAAa;AACvC,SAAS,kBAAkB,cAAc;AAIlC,MAAM,eAAe;AAAA,EAClB,aAAa;AAAA;AAAA,EACb,gBAAgB,iBAAiB;AAAA,EAEzC,MAAM,MAAM,UAAmC;AAC7C,QAAI,KAAK,cAAc,QAAQ,OAAO;AAEpC,YAAM,KAAK,aAAa;AAAA,IAC1B;AAEA,aAAS,MAAM,cAAc,WAAW,kBAAkB,YAAY;AACpE,UAAI,CAAC,KAAK,YAAY;AACpB,YAAI;AACF,gBAAM,gBAAgB,KAAK,aAAa;AACxC,eAAK,aAAa;AAAA,QACpB,SAAS,OAAO;AACd,iBAAO,4BAA4B,KAAK,IAAI;AAAA,YAC1C,OAAO;AAAA,UACT,CAAC;AAAA,QACH;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AACF;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webpack-plugin.d.ts","sourceRoot":"","sources":["../../src/webpack-plugin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"webpack-plugin.d.ts","sourceRoot":"","sources":["../../src/webpack-plugin.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGxC,qBAAa,cAAc;IACzB,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,aAAa,CAAsB;IAErC,KAAK,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;CAmB/C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/webpack",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0-canary.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": [
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
"fast-glob": "^3.3.3",
|
|
62
62
|
"webpack": "^5.99.9",
|
|
63
63
|
"webpack-dev-server": "^5.2.0",
|
|
64
|
-
"@intlayer/chokidar": "
|
|
65
|
-
"@intlayer/config": "
|
|
64
|
+
"@intlayer/chokidar": "6.0.0-canary.0",
|
|
65
|
+
"@intlayer/config": "6.0.0-canary.0"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@changesets/cli": "2.29.5",
|
|
@@ -70,13 +70,13 @@
|
|
|
70
70
|
"@types/node": "^24.2.1",
|
|
71
71
|
"@typescript-eslint/parser": "^8.33.1",
|
|
72
72
|
"concurrently": "^9.1.2",
|
|
73
|
-
"eslint": "^9.
|
|
74
|
-
"prettier": "^3.
|
|
73
|
+
"eslint": "^9.34.0",
|
|
74
|
+
"prettier": "^3.6.2",
|
|
75
75
|
"rimraf": "^6.0.1",
|
|
76
76
|
"tsc-alias": "^1.8.16",
|
|
77
77
|
"tsup": "^8.5.0",
|
|
78
78
|
"typescript": "^5.9.2",
|
|
79
|
-
"vitest": "^3.2.
|
|
79
|
+
"vitest": "^3.2.4",
|
|
80
80
|
"@utils/eslint-config": "1.0.4",
|
|
81
81
|
"@utils/ts-config": "1.0.4",
|
|
82
82
|
"@utils/ts-config-types": "1.0.4",
|
|
@@ -84,9 +84,9 @@
|
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
86
|
"webpack": "^5.99.9",
|
|
87
|
-
"@intlayer/
|
|
88
|
-
"@intlayer/
|
|
89
|
-
"@intlayer/
|
|
87
|
+
"@intlayer/chokidar": "6.0.0-canary.0",
|
|
88
|
+
"@intlayer/config": "6.0.0-canary.0",
|
|
89
|
+
"@intlayer/api": "6.0.0-canary.0"
|
|
90
90
|
},
|
|
91
91
|
"engines": {
|
|
92
92
|
"node": ">=14.18"
|