react-scripts-intlayer 7.5.12 → 7.5.14
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intlayerCracoPlugin.cjs","names":["IntlayerWebpackPlugin"
|
|
1
|
+
{"version":3,"file":"intlayerCracoPlugin.cjs","names":["IntlayerWebpackPlugin"],"sources":["../../src/intlayerCracoPlugin.ts"],"sourcesContent":["import { join } from 'node:path';\nimport type {\n CracoConfig,\n CracoConfigOverride,\n CracoPlugin,\n WebpackConfigOverride,\n} from '@craco/types';\nimport { getAlias, getConfiguration } from '@intlayer/config';\nimport { IntlayerPlugin as IntlayerWebpackPlugin } from '@intlayer/webpack';\nimport { defu } from 'defu';\nimport type { Configuration as WebpackConfig } from 'webpack';\n\n// Get Intlayer configuration\nconst intlayerConfig = getConfiguration();\n\nconst alias = getAlias({\n configuration: intlayerConfig,\n formatter: (value: string) => join(process.cwd(), value),\n});\n\n/**\n * Override the final CRA Webpack config.\n * We explicitely type the return as WebpackConfig to solve TS2742.\n */\nexport const overrideWebpackConfig = ({\n webpackConfig,\n}: WebpackConfigOverride): WebpackConfig => {\n // 1) Remove `module`, `fs`, `path`, `vm` from externals.\n if (typeof webpackConfig.externals === 'object') {\n webpackConfig.externals = {\n ...webpackConfig.externals,\n esbuild: 'esbuild',\n };\n }\n\n // 2) Properly push node-loader rule\n webpackConfig.module?.rules?.push({\n test: /\\.node$/,\n use: 'node-loader',\n });\n\n // We cast here to satisfy the internal function return type if there are minor discrepancies\n return webpackConfig as WebpackConfig;\n};\n\n/**\n * Override the CRACO config itself to set up aliases, fallbacks, and plugins.\n */\nexport const overrideCracoConfig = ({\n cracoConfig,\n}: CracoConfigOverride): CracoConfig =>\n defu(\n {\n webpack: {\n plugins: {\n // defu overwrites arrays by default, so we manually preserve existing plugins\n add: [\n ...(cracoConfig.webpack?.plugins?.add ?? []),\n new IntlayerWebpackPlugin(intlayerConfig),\n ],\n },\n // Automatically merges deeply with existing aliases\n alias,\n },\n },\n cracoConfig\n ) as CracoConfig;\n\n/**\n * A CRACO plugin that adds the Intlayer configuration to the webpack configuration\n * and sets the environment variables.\n */\nexport const intlayerCracoPlugin: CracoPlugin = {\n overrideCracoConfig,\n // We cast to `any` here to bypass the strict version mismatch between\n // the 'webpack' package installed in your node_modules and the one expected by '@craco/types'\n overrideWebpackConfig: overrideWebpackConfig as any,\n};\n"],"mappings":";;;;;;AAaA,MAAM,yDAAmC;AAEzC,MAAM,uCAAiB;CACrB,eAAe;CACf,YAAY,8BAAuB,QAAQ,KAAK,EAAE,MAAM;CACzD,CAAC;;;;;AAMF,MAAa,yBAAyB,EACpC,oBAC0C;AAE1C,KAAI,OAAO,cAAc,cAAc,SACrC,eAAc,YAAY;EACxB,GAAG,cAAc;EACjB,SAAS;EACV;AAIH,eAAc,QAAQ,OAAO,KAAK;EAChC,MAAM;EACN,KAAK;EACN,CAAC;AAGF,QAAO;;;;;AAMT,MAAa,uBAAuB,EAClC,iCAGE,EACE,SAAS;CACP,SAAS,EAEP,KAAK,CACH,GAAI,YAAY,SAAS,SAAS,OAAO,EAAE,EAC3C,IAAIA,iCAAsB,eAAe,CAC1C,EACF;CAED;CACD,EACF,EACD,YACD;;;;;AAMH,MAAa,sBAAmC;CAC9C;CAGuB;CACxB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-scripts-intlayer",
|
|
3
|
-
"version": "7.5.
|
|
3
|
+
"version": "7.5.14",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Integrate Intlayer with Create React App using custom React scripts for internationalization i18n and advanced Webpack configurations",
|
|
6
6
|
"keywords": [
|
|
@@ -80,9 +80,9 @@
|
|
|
80
80
|
},
|
|
81
81
|
"dependencies": {
|
|
82
82
|
"@craco/craco": "7.1.0",
|
|
83
|
-
"@intlayer/config": "7.5.
|
|
84
|
-
"@intlayer/types": "7.5.
|
|
85
|
-
"@intlayer/webpack": "7.5.
|
|
83
|
+
"@intlayer/config": "7.5.14",
|
|
84
|
+
"@intlayer/types": "7.5.14",
|
|
85
|
+
"@intlayer/webpack": "7.5.14",
|
|
86
86
|
"defu": "^6.1.4",
|
|
87
87
|
"node-loader": "2.1.0",
|
|
88
88
|
"process": "0.11.10",
|
|
@@ -91,15 +91,15 @@
|
|
|
91
91
|
"devDependencies": {
|
|
92
92
|
"@craco/types": "7.1.0",
|
|
93
93
|
"@types/cross-spawn": "6.0.6",
|
|
94
|
-
"@types/node": "25.0.
|
|
94
|
+
"@types/node": "25.0.6",
|
|
95
95
|
"@types/webpack": "5.28.5",
|
|
96
96
|
"@utils/ts-config": "1.0.4",
|
|
97
97
|
"@utils/ts-config-types": "1.0.4",
|
|
98
98
|
"@utils/tsdown-config": "1.0.4",
|
|
99
99
|
"rimraf": "6.1.2",
|
|
100
|
-
"tsdown": "0.
|
|
100
|
+
"tsdown": "0.19.0",
|
|
101
101
|
"typescript": "5.9.3",
|
|
102
|
-
"vitest": "4.0.
|
|
102
|
+
"vitest": "4.0.17"
|
|
103
103
|
},
|
|
104
104
|
"peerDependencies": {
|
|
105
105
|
"webpack": ">=5.0.0"
|