@intlayer/webpack 8.9.7 → 8.10.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.
- package/README.md +14 -0
- package/dist/cjs/getEntries.cjs.map +1 -1
- package/dist/cjs/utils.cjs.map +1 -1
- package/dist/cjs/webpack-plugin.cjs.map +1 -1
- package/dist/cjs/webpack.config.cjs.map +1 -1
- package/dist/esm/getEntries.mjs.map +1 -1
- package/dist/esm/utils.mjs.map +1 -1
- package/dist/esm/webpack-plugin.mjs.map +1 -1
- package/dist/esm/webpack.config.mjs.map +1 -1
- package/dist/types/webpack.config.d.ts.map +1 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -67,6 +67,7 @@ With **per-locale content files**, **TypeScript autocompletion**, **tree-shakabl
|
|
|
67
67
|
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/mcp.png?raw=true" alt="Feature" width="700"> | **MCP Server Integration**<br><br>Provides an MCP (Model Context Protocol) server for IDE automation, enabling seamless content management and i18n workflows directly within your development environment. <br><br> - [MCP Server](https://github.com/aymericzip/intlayer/blob/main/docs/docs/en/mcp_server.md) |
|
|
68
68
|
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/vscode_extension.png?raw=true" alt="Feature" width="700"> | **VSCode Extension**<br><br>Intlayer provides a VSCode extension to help you manage your content and translations, building your dictionaries, translating your content, and more. <br><br> - [VSCode Extension](https://intlayer.org/doc/vs-code-extension) |
|
|
69
69
|
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/interoperability.png?raw=true" alt="Feature" width="700"> | **Interoperability**<br><br>Allow interoperability with react-i18next, next-i18next, next-intl, react-intl, vue-i18n. <br><br> - [Intlayer and react-intl](https://intlayer.org/blog/intlayer-with-react-intl) <br> - [Intlayer and next-intl](https://intlayer.org/blog/intlayer-with-next-intl) <br> - [Intlayer and next-i18next](https://intlayer.org/blog/intlayer-with-next-i18next) <br> - [Intlayer and vue-i18n](https://intlayer.org/blog/intlayer-with-vue-i18n) |
|
|
70
|
+
| <img src="https://github.com/aymericzip/intlayer/blob/main/docs/assets/benchmark.png?raw=true" alt="Feature" width="700"> | **Performances & Benchmark**<br><br>Uses advanced tree-shaking and dynamic loading to boost performances and keep the solution as light as possible. <br><br> - [Performances & Benchmark](https://intlayer.org/doc/benchmark) |
|
|
70
71
|
|
|
71
72
|
---
|
|
72
73
|
|
|
@@ -249,6 +250,19 @@ Explore our comprehensive documentation to get started with Intlayer and learn h
|
|
|
249
250
|
</ul>
|
|
250
251
|
</details>
|
|
251
252
|
|
|
253
|
+
## Multilingual content management system
|
|
254
|
+
|
|
255
|
+
More than an i18n library, Intlayer is a complete **multilingual content management system**. A full CMS is available for free at [app.intlayer.org](https://app.intlayer.org).
|
|
256
|
+
|
|
257
|
+
Intlayer connects **developers**, **copywriters**, and **AI agents** in one workflow for creating and maintaining multilingual websites effortlessly.Intlayer replaces the following stack in a single solution:
|
|
258
|
+
|
|
259
|
+
- i18n solutions (e.g. `i18next`, `next-intl`, `vue-i18n`)
|
|
260
|
+
- TMSs (Translation Management Systems) (e.g. Crowdin, Phrase, Lokalise)
|
|
261
|
+
- Feature flags
|
|
262
|
+
- Headless CMSs (e.g. Contentful, Strapi, Sanity)
|
|
263
|
+
|
|
264
|
+

|
|
265
|
+
|
|
252
266
|
## 🌐 Readme in other languages
|
|
253
267
|
|
|
254
268
|
<p align="center">
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getEntries.cjs","names":[],"sources":["../../src/getEntries.ts"],"sourcesContent":["import { listDictionaries } from '@intlayer/chokidar/listDictionaries';\nimport { getPathHash } from '@intlayer/chokidar/utils';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport type { EntryObject } from 'webpack';\n\nexport const getEntries = async (\n configuration: IntlayerConfig\n): Promise<EntryObject> => {\n const files = await listDictionaries(configuration);\n\n return files.reduce((obj, el) => {\n const hash = getPathHash(el);\n\n obj[`intlayer-content/${hash}`] = {\n import: el,\n dependOn: undefined,\n };\n\n return obj;\n }, {} as EntryObject);\n};\n"],"mappings":";;;;;;AAKA,MAAa,aAAa,OACxB,kBACyB;CAGzB,QAAO,gEAF8B,
|
|
1
|
+
{"version":3,"file":"getEntries.cjs","names":[],"sources":["../../src/getEntries.ts"],"sourcesContent":["import { listDictionaries } from '@intlayer/chokidar/listDictionaries';\nimport { getPathHash } from '@intlayer/chokidar/utils';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport type { EntryObject } from 'webpack';\n\nexport const getEntries = async (\n configuration: IntlayerConfig\n): Promise<EntryObject> => {\n const files = await listDictionaries(configuration);\n\n return files.reduce((obj, el) => {\n const hash = getPathHash(el);\n\n obj[`intlayer-content/${hash}`] = {\n import: el,\n dependOn: undefined,\n };\n\n return obj;\n }, {} as EntryObject);\n};\n"],"mappings":";;;;;;AAKA,MAAa,aAAa,OACxB,kBACyB;CAGzB,QAAO,gEAF8B,aAAa,GAErC,QAAQ,KAAK,OAAO;EAC/B,MAAM,iDAAmB,EAAE;EAE3B,IAAI,oBAAoB,UAAU;GAChC,QAAQ;GACR,UAAU;EACZ;EAEA,OAAO;CACT,GAAG,CAAC,CAAgB;AACtB"}
|
package/dist/cjs/utils.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.cjs","names":["isESModule","path"],"sources":["../../src/utils.ts"],"sourcesContent":["import path from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { isESModule } from '@intlayer/config/utils';\n\n/**\n * Set the __dirname global variable to make the config work in both ESM and CJS environments\n */\nexport const defineDirname = () => {\n const filename = isESModule\n ? fileURLToPath(import.meta.url)\n : require('node:url').pathToFileURL(__filename).toString();\n\n globalThis.__filename = globalThis.__filename ?? filename;\n globalThis.__dirname = globalThis.__dirname ?? path.dirname(__filename);\n};\n"],"mappings":";;;;;;;;;;;AAOA,MAAa,sBAAsB;CACjC,MAAM,WAAWA,
|
|
1
|
+
{"version":3,"file":"utils.cjs","names":["isESModule","path"],"sources":["../../src/utils.ts"],"sourcesContent":["import path from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { isESModule } from '@intlayer/config/utils';\n\n/**\n * Set the __dirname global variable to make the config work in both ESM and CJS environments\n */\nexport const defineDirname = () => {\n const filename = isESModule\n ? fileURLToPath(import.meta.url)\n : require('node:url').pathToFileURL(__filename).toString();\n\n globalThis.__filename = globalThis.__filename ?? filename;\n globalThis.__dirname = globalThis.__dirname ?? path.dirname(__filename);\n};\n"],"mappings":";;;;;;;;;;;AAOA,MAAa,sBAAsB;CACjC,MAAM,WAAWA,6GACgB,IAC7B,QAAQ,UAAU,EAAE,cAAc,UAAU,EAAE,SAAS;CAE3D,WAAW,aAAa,WAAW,cAAc;CACjD,WAAW,YAAY,WAAW,aAAaC,kBAAK,QAAQ,UAAU;AACxE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webpack-plugin.cjs","names":["BLUE"],"sources":["../../src/webpack-plugin.ts"],"sourcesContent":["import { prepareIntlayer } from '@intlayer/chokidar/build';\nimport { watch } from '@intlayer/chokidar/watcher';\nimport { BLUE } from '@intlayer/config/colors';\nimport {\n formatNodeTypeToEnvVar,\n getConfigEnvVars,\n} from '@intlayer/config/envVars';\nimport { colorize, getAppLogger } from '@intlayer/config/logger';\nimport { getConfiguration } from '@intlayer/config/node';\nimport { getUnusedNodeTypesAsync } from '@intlayer/config/utils';\nimport { getDictionaries } from '@intlayer/dictionaries-entry';\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 const { webpack } = compiler;\n\n const isBuild = compiler.options.mode !== 'development';\n\n const appLogger = getAppLogger(this.configuration);\n\n let env: Record<string, string> = {};\n\n if (isBuild) {\n const dictionaries = getDictionaries(this.configuration);\n\n if (Object.keys(dictionaries).length === 0) {\n appLogger('No dictionaries found. Please check your configuration.', {\n isVerbose: true,\n });\n }\n\n const unusedNodeTypes = await getUnusedNodeTypesAsync(dictionaries);\n\n if (unusedNodeTypes && unusedNodeTypes.length > 0) {\n appLogger(\n [\n 'Filtering out plugins:',\n unusedNodeTypes.map((key) => colorize(key, BLUE)).join(', '),\n ],\n {\n isVerbose: true,\n }\n );\n }\n\n env = {\n ...env,\n\n // Tree shacking based on unused node types\n ...formatNodeTypeToEnvVar(unusedNodeTypes),\n\n // Tree shacking based on config\n ...getConfigEnvVars(this.configuration),\n };\n }\n\n new webpack.DefinePlugin(env).apply(compiler);\n\n if (this.configuration.content.watch) {\n // Start watching (assuming watch is also async)\n await 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 appLogger(`Error in IntlayerPlugin: ${error}`, {\n level: 'error',\n });\n }\n }\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;AAeA,IAAa,iBAAb,MAA4B;CAC1B,AAAQ,aAAa;CACrB,AAAQ;CAER,YAAY,eAAgC;EAC1C,KAAK,gBAAgB,
|
|
1
|
+
{"version":3,"file":"webpack-plugin.cjs","names":["BLUE"],"sources":["../../src/webpack-plugin.ts"],"sourcesContent":["import { prepareIntlayer } from '@intlayer/chokidar/build';\nimport { watch } from '@intlayer/chokidar/watcher';\nimport { BLUE } from '@intlayer/config/colors';\nimport {\n formatNodeTypeToEnvVar,\n getConfigEnvVars,\n} from '@intlayer/config/envVars';\nimport { colorize, getAppLogger } from '@intlayer/config/logger';\nimport { getConfiguration } from '@intlayer/config/node';\nimport { getUnusedNodeTypesAsync } from '@intlayer/config/utils';\nimport { getDictionaries } from '@intlayer/dictionaries-entry';\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 const { webpack } = compiler;\n\n const isBuild = compiler.options.mode !== 'development';\n\n const appLogger = getAppLogger(this.configuration);\n\n let env: Record<string, string> = {};\n\n if (isBuild) {\n const dictionaries = getDictionaries(this.configuration);\n\n if (Object.keys(dictionaries).length === 0) {\n appLogger('No dictionaries found. Please check your configuration.', {\n isVerbose: true,\n });\n }\n\n const unusedNodeTypes = await getUnusedNodeTypesAsync(dictionaries);\n\n if (unusedNodeTypes && unusedNodeTypes.length > 0) {\n appLogger(\n [\n 'Filtering out plugins:',\n unusedNodeTypes.map((key) => colorize(key, BLUE)).join(', '),\n ],\n {\n isVerbose: true,\n }\n );\n }\n\n env = {\n ...env,\n\n // Tree shacking based on unused node types\n ...formatNodeTypeToEnvVar(unusedNodeTypes),\n\n // Tree shacking based on config\n ...getConfigEnvVars(this.configuration),\n };\n }\n\n new webpack.DefinePlugin(env).apply(compiler);\n\n if (this.configuration.content.watch) {\n // Start watching (assuming watch is also async)\n await 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 appLogger(`Error in IntlayerPlugin: ${error}`, {\n level: 'error',\n });\n }\n }\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;AAeA,IAAa,iBAAb,MAA4B;CAC1B,AAAQ,aAAa;CACrB,AAAQ;CAER,YAAY,eAAgC;EAC1C,KAAK,gBAAgB,6DAAkC;CACzD;CAEA,MAAM,MAAM,UAAmC;EAC7C,MAAM,EAAE,YAAY;EAEpB,MAAM,UAAU,SAAS,QAAQ,SAAS;EAE1C,MAAM,sDAAyB,KAAK,aAAa;EAEjD,IAAI,MAA8B,CAAC;EAEnC,IAAI,SAAS;GACX,MAAM,iEAA+B,KAAK,aAAa;GAEvD,IAAI,OAAO,KAAK,YAAY,EAAE,WAAW,GACvC,UAAU,2DAA2D,EACnE,WAAW,KACb,CAAC;GAGH,MAAM,kBAAkB,0DAA8B,YAAY;GAElE,IAAI,mBAAmB,gBAAgB,SAAS,GAC9C,UACE,CACE,0BACA,gBAAgB,KAAK,8CAAiB,KAAKA,4BAAI,CAAC,EAAE,KAAK,IAAI,CAC7D,GACA,EACE,WAAW,KACb,CACF;GAGF,MAAM;IACJ,GAAG;IAGH,wDAA0B,eAAe;IAGzC,kDAAoB,KAAK,aAAa;GACxC;EACF;EAEA,IAAI,QAAQ,aAAa,GAAG,EAAE,MAAM,QAAQ;EAE5C,IAAI,KAAK,cAAc,QAAQ,OAE7B,4CAAY,EAAE,eAAe,KAAK,cAAc,CAAC;EAGnD,SAAS,MAAM,cAAc,WAAW,kBAAkB,YAAY;GACpE,IAAI,CAAC,KAAK,YACR,IAAI;IACF,oDAAsB,KAAK,aAAa;IACxC,KAAK,aAAa;GACpB,SAAS,OAAO;IACd,UAAU,4BAA4B,SAAS,EAC7C,OAAO,QACT,CAAC;GACH;EAEJ,CAAC;CACH;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webpack.config.cjs","names":["getEntries","IntlayerPlugin"],"sources":["../../src/webpack.config.ts"],"sourcesContent":["import { join } from 'node:path';\nimport { getConfiguration } from '@intlayer/config/node';\nimport type { IntlayerConfig } from '@intlayer/types/config';\n// @ts-ignore - Export exists\nimport type { Configuration as WebPackConfiguration } from 'webpack';\nimport type { Configuration as DevServerConfiguration } from 'webpack-dev-server';\nimport { getEntries } from './getEntries';\nimport { defineDirname } from './utils';\nimport { IntlayerPlugin } from './webpack-plugin';\n\n// For web interface\nexport const devServerConfig: DevServerConfiguration = {\n // Enable hot module replacement\n hot: true,\n // Open the browser\n open: false,\n liveReload: false,\n\n // Enable compression\n compress: true,\n\n // History API fallback\n historyApiFallback: false,\n\n // Host and port\n host: 'localhost',\n port: 8080,\n\n watchFiles: './src/', // derived from content.fileExtensions + content.contentDir\n\n devMiddleware: {\n // Enable write to disk to reuse the output\n writeToDisk: true,\n },\n\n // Content base\n static: {},\n};\n\nexport const getWebpackConfig = (\n configuration: IntlayerConfig = getConfiguration()\n): WebPackConfiguration => {\n const { fileExtensions } = configuration.content;\n\n /**\n * Set the __dirname global variable to make the config work in both ESM and CJS environments\n */\n defineDirname();\n\n const webpackConfig: WebPackConfiguration = {\n // Define the environment mode (development or production)\n mode: 'production', // or 'production'\n // Entry point of the application\n target: 'node', // Specifies the target environment\n\n entry: () => getEntries(configuration),\n output: {\n clean: true, // Clean the output directory before emit\n library: 'IntlLayerContent',\n libraryTarget: 'umd',\n filename: `[name].bundle.js`,\n },\n\n cache: false,\n\n devtool: 'source-map',\n\n // stats: {\n // preset: 'errors-only',\n // warnings: false,\n // },\n ignoreWarnings: [/./],\n resolve: {\n // Resolve TypeScript, JavaScript and JSON files\n extensions: [\n '.ts',\n '.js',\n '.json',\n '.wasm',\n '.ts',\n '.tsx',\n '.mjs',\n '.cjs',\n ],\n modules: [\n // To find the loader module\n join(globalThis.__dirname, '..', 'node_modules'), // In the project node_modules\n join(process.cwd(), 'node_modules'), // In the project node_modules\n join(process.cwd(), 'node_modules', 'intlayer-cli', 'node_modules'), // Or via another project by importing intlayer\n join(\n process.cwd(),\n 'node_modules',\n 'intlayer-cli',\n 'node_modules',\n '@intlayer/webpack',\n 'node_modules'\n ), // Or via another project by importing intlayer\n ],\n },\n\n resolveLoader: {\n // Configure how Webpack finds `loader` modules.\n modules: [\n // To find the loader module\n join(process.cwd(), 'node_modules'), // In the project node_modules\n join(\n process.cwd(),\n 'node_modules',\n '@intlayer/webpack',\n 'node_modules'\n ), // Or via another project by importing @intlayer/webpack\n join(\n process.cwd(),\n 'node_modules',\n 'intlayer-cli',\n 'node_modules',\n '@intlayer/webpack',\n 'node_modules'\n ), // Or via another project by importing intlayer\n ],\n },\n\n module: {\n rules: [\n {\n // Rule for .content.ts files\n test: new RegExp(`(${fileExtensions.join('|')})$`),\n use: [\n {\n // Transpile with esbuild-loader\n loader: 'esbuild-loader',\n options: {\n // JavaScript version to compile to\n target: 'es2015',\n },\n },\n // {\n // // Custom loader to process the transpiled code\n // loader: resolve('./intlayer-loader'),\n // },\n ],\n },\n {\n test: /\\.node$/,\n loader: 'node-loader',\n },\n // Use esbuild to compile JavaScript & TypeScript\n {\n // Match `.js`, `.jsx`, `.ts` or `.tsx` files\n test: /\\.(jsx|js|ts|tsx|mjs|cjs)?$/,\n loader: 'esbuild-loader',\n options: {\n // JavaScript version to compile to\n target: 'es2015',\n },\n },\n\n // JSON files are supported natively by Webpack 5, no specific loader required\n ],\n },\n devServer: devServerConfig,\n\n plugins: [new IntlayerPlugin(configuration)],\n };\n\n return webpackConfig;\n};\n\nexport default getWebpackConfig;\n"],"mappings":";;;;;;;;;AAWA,MAAa,kBAA0C;CAErD,KAAK;CAEL,MAAM;CACN,YAAY;CAGZ,UAAU;CAGV,oBAAoB;CAGpB,MAAM;CACN,MAAM;CAEN,YAAY;CAEZ,eAAe,EAEb,aAAa,
|
|
1
|
+
{"version":3,"file":"webpack.config.cjs","names":["getEntries","IntlayerPlugin"],"sources":["../../src/webpack.config.ts"],"sourcesContent":["import { join } from 'node:path';\nimport { getConfiguration } from '@intlayer/config/node';\nimport type { IntlayerConfig } from '@intlayer/types/config';\n// @ts-ignore - Export exists\nimport type { Configuration as WebPackConfiguration } from 'webpack';\nimport type { Configuration as DevServerConfiguration } from 'webpack-dev-server';\nimport { getEntries } from './getEntries';\nimport { defineDirname } from './utils';\nimport { IntlayerPlugin } from './webpack-plugin';\n\n// For web interface\nexport const devServerConfig: DevServerConfiguration = {\n // Enable hot module replacement\n hot: true,\n // Open the browser\n open: false,\n liveReload: false,\n\n // Enable compression\n compress: true,\n\n // History API fallback\n historyApiFallback: false,\n\n // Host and port\n host: 'localhost',\n port: 8080,\n\n watchFiles: './src/', // derived from content.fileExtensions + content.contentDir\n\n devMiddleware: {\n // Enable write to disk to reuse the output\n writeToDisk: true,\n },\n\n // Content base\n static: {},\n};\n\nexport const getWebpackConfig = (\n configuration: IntlayerConfig = getConfiguration()\n): WebPackConfiguration => {\n const { fileExtensions } = configuration.content;\n\n /**\n * Set the __dirname global variable to make the config work in both ESM and CJS environments\n */\n defineDirname();\n\n const webpackConfig: WebPackConfiguration = {\n // Define the environment mode (development or production)\n mode: 'production', // or 'production'\n // Entry point of the application\n target: 'node', // Specifies the target environment\n\n entry: () => getEntries(configuration),\n output: {\n clean: true, // Clean the output directory before emit\n library: 'IntlLayerContent',\n libraryTarget: 'umd',\n filename: `[name].bundle.js`,\n },\n\n cache: false,\n\n devtool: 'source-map',\n\n // stats: {\n // preset: 'errors-only',\n // warnings: false,\n // },\n ignoreWarnings: [/./],\n resolve: {\n // Resolve TypeScript, JavaScript and JSON files\n extensions: [\n '.ts',\n '.js',\n '.json',\n '.wasm',\n '.ts',\n '.tsx',\n '.mjs',\n '.cjs',\n ],\n modules: [\n // To find the loader module\n join(globalThis.__dirname, '..', 'node_modules'), // In the project node_modules\n join(process.cwd(), 'node_modules'), // In the project node_modules\n join(process.cwd(), 'node_modules', 'intlayer-cli', 'node_modules'), // Or via another project by importing intlayer\n join(\n process.cwd(),\n 'node_modules',\n 'intlayer-cli',\n 'node_modules',\n '@intlayer/webpack',\n 'node_modules'\n ), // Or via another project by importing intlayer\n ],\n },\n\n resolveLoader: {\n // Configure how Webpack finds `loader` modules.\n modules: [\n // To find the loader module\n join(process.cwd(), 'node_modules'), // In the project node_modules\n join(\n process.cwd(),\n 'node_modules',\n '@intlayer/webpack',\n 'node_modules'\n ), // Or via another project by importing @intlayer/webpack\n join(\n process.cwd(),\n 'node_modules',\n 'intlayer-cli',\n 'node_modules',\n '@intlayer/webpack',\n 'node_modules'\n ), // Or via another project by importing intlayer\n ],\n },\n\n module: {\n rules: [\n {\n // Rule for .content.ts files\n test: new RegExp(`(${fileExtensions.join('|')})$`),\n use: [\n {\n // Transpile with esbuild-loader\n loader: 'esbuild-loader',\n options: {\n // JavaScript version to compile to\n target: 'es2015',\n },\n },\n // {\n // // Custom loader to process the transpiled code\n // loader: resolve('./intlayer-loader'),\n // },\n ],\n },\n {\n test: /\\.node$/,\n loader: 'node-loader',\n },\n // Use esbuild to compile JavaScript & TypeScript\n {\n // Match `.js`, `.jsx`, `.ts` or `.tsx` files\n test: /\\.(jsx|js|ts|tsx|mjs|cjs)?$/,\n loader: 'esbuild-loader',\n options: {\n // JavaScript version to compile to\n target: 'es2015',\n },\n },\n\n // JSON files are supported natively by Webpack 5, no specific loader required\n ],\n },\n devServer: devServerConfig,\n\n plugins: [new IntlayerPlugin(configuration)],\n };\n\n return webpackConfig;\n};\n\nexport default getWebpackConfig;\n"],"mappings":";;;;;;;;;AAWA,MAAa,kBAA0C;CAErD,KAAK;CAEL,MAAM;CACN,YAAY;CAGZ,UAAU;CAGV,oBAAoB;CAGpB,MAAM;CACN,MAAM;CAEN,YAAY;CAEZ,eAAe,EAEb,aAAa,KACf;CAGA,QAAQ,CAAC;AACX;AAEA,MAAa,oBACX,4DAAiD,MACxB;CACzB,MAAM,EAAE,mBAAmB,cAAc;;;;CAKzC,4BAAc;CAsHd,OAAO;EAlHL,MAAM;EAEN,QAAQ;EAER,aAAaA,8BAAW,aAAa;EACrC,QAAQ;GACN,OAAO;GACP,SAAS;GACT,eAAe;GACf,UAAU;EACZ;EAEA,OAAO;EAEP,SAAS;EAMT,gBAAgB,CAAC,GAAG;EACpB,SAAS;GAEP,YAAY;IACV;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;GACA,SAAS;wBAEF,WAAW,WAAW,MAAM,cAAc;wBAC1C,QAAQ,IAAI,GAAG,cAAc;wBAC7B,QAAQ,IAAI,GAAG,gBAAgB,gBAAgB,cAAc;wBAEhE,QAAQ,IAAI,GACZ,gBACA,gBACA,gBACA,qBACA,cACF;GACF;EACF;EAEA,eAAe,EAEb,SAAS;uBAEF,QAAQ,IAAI,GAAG,cAAc;uBAEhC,QAAQ,IAAI,GACZ,gBACA,qBACA,cACF;uBAEE,QAAQ,IAAI,GACZ,gBACA,gBACA,gBACA,qBACA,cACF;EACF,EACF;EAEA,QAAQ,EACN,OAAO;GACL;IAEE,MAAM,IAAI,OAAO,IAAI,eAAe,KAAK,GAAG,EAAE,GAAG;IACjD,KAAK,CACH;KAEE,QAAQ;KACR,SAAS,EAEP,QAAQ,SACV;IACF,CAKF;GACF;GACA;IACE,MAAM;IACN,QAAQ;GACV;GAEA;IAEE,MAAM;IACN,QAAQ;IACR,SAAS,EAEP,QAAQ,SACV;GACF;EAGF,EACF;EACA,WAAW;EAEX,SAAS,CAAC,IAAIC,sCAAe,aAAa,CAAC;CAG1B;AACrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getEntries.mjs","names":[],"sources":["../../src/getEntries.ts"],"sourcesContent":["import { listDictionaries } from '@intlayer/chokidar/listDictionaries';\nimport { getPathHash } from '@intlayer/chokidar/utils';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport type { EntryObject } from 'webpack';\n\nexport const getEntries = async (\n configuration: IntlayerConfig\n): Promise<EntryObject> => {\n const files = await listDictionaries(configuration);\n\n return files.reduce((obj, el) => {\n const hash = getPathHash(el);\n\n obj[`intlayer-content/${hash}`] = {\n import: el,\n dependOn: undefined,\n };\n\n return obj;\n }, {} as EntryObject);\n};\n"],"mappings":";;;;AAKA,MAAa,aAAa,OACxB,kBACyB;CAGzB,QAAO,MAFa,iBAAiB,
|
|
1
|
+
{"version":3,"file":"getEntries.mjs","names":[],"sources":["../../src/getEntries.ts"],"sourcesContent":["import { listDictionaries } from '@intlayer/chokidar/listDictionaries';\nimport { getPathHash } from '@intlayer/chokidar/utils';\nimport type { IntlayerConfig } from '@intlayer/types/config';\nimport type { EntryObject } from 'webpack';\n\nexport const getEntries = async (\n configuration: IntlayerConfig\n): Promise<EntryObject> => {\n const files = await listDictionaries(configuration);\n\n return files.reduce((obj, el) => {\n const hash = getPathHash(el);\n\n obj[`intlayer-content/${hash}`] = {\n import: el,\n dependOn: undefined,\n };\n\n return obj;\n }, {} as EntryObject);\n};\n"],"mappings":";;;;AAKA,MAAa,aAAa,OACxB,kBACyB;CAGzB,QAAO,MAFa,iBAAiB,aAAa,GAErC,QAAQ,KAAK,OAAO;EAC/B,MAAM,OAAO,YAAY,EAAE;EAE3B,IAAI,oBAAoB,UAAU;GAChC,QAAQ;GACR,UAAU;EACZ;EAEA,OAAO;CACT,GAAG,CAAC,CAAgB;AACtB"}
|
package/dist/esm/utils.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.mjs","names":[],"sources":["../../src/utils.ts"],"sourcesContent":["import path from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { isESModule } from '@intlayer/config/utils';\n\n/**\n * Set the __dirname global variable to make the config work in both ESM and CJS environments\n */\nexport const defineDirname = () => {\n const filename = isESModule\n ? fileURLToPath(import.meta.url)\n : require('node:url').pathToFileURL(__filename).toString();\n\n globalThis.__filename = globalThis.__filename ?? filename;\n globalThis.__dirname = globalThis.__dirname ?? path.dirname(__filename);\n};\n"],"mappings":";;;;;;;;;AAOA,MAAa,sBAAsB;CACjC,MAAM,WAAW,aACb,cAAc,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"utils.mjs","names":[],"sources":["../../src/utils.ts"],"sourcesContent":["import path from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { isESModule } from '@intlayer/config/utils';\n\n/**\n * Set the __dirname global variable to make the config work in both ESM and CJS environments\n */\nexport const defineDirname = () => {\n const filename = isESModule\n ? fileURLToPath(import.meta.url)\n : require('node:url').pathToFileURL(__filename).toString();\n\n globalThis.__filename = globalThis.__filename ?? filename;\n globalThis.__dirname = globalThis.__dirname ?? path.dirname(__filename);\n};\n"],"mappings":";;;;;;;;;AAOA,MAAa,sBAAsB;CACjC,MAAM,WAAW,aACb,cAAc,OAAO,KAAK,GAAG,cACrB,UAAU,EAAE,cAAc,UAAU,EAAE,SAAS;CAE3D,WAAW,aAAa,WAAW,cAAc;CACjD,WAAW,YAAY,WAAW,aAAa,KAAK,QAAQ,UAAU;AACxE"}
|
|
@@ -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 { BLUE } from '@intlayer/config/colors';\nimport {\n formatNodeTypeToEnvVar,\n getConfigEnvVars,\n} from '@intlayer/config/envVars';\nimport { colorize, getAppLogger } from '@intlayer/config/logger';\nimport { getConfiguration } from '@intlayer/config/node';\nimport { getUnusedNodeTypesAsync } from '@intlayer/config/utils';\nimport { getDictionaries } from '@intlayer/dictionaries-entry';\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 const { webpack } = compiler;\n\n const isBuild = compiler.options.mode !== 'development';\n\n const appLogger = getAppLogger(this.configuration);\n\n let env: Record<string, string> = {};\n\n if (isBuild) {\n const dictionaries = getDictionaries(this.configuration);\n\n if (Object.keys(dictionaries).length === 0) {\n appLogger('No dictionaries found. Please check your configuration.', {\n isVerbose: true,\n });\n }\n\n const unusedNodeTypes = await getUnusedNodeTypesAsync(dictionaries);\n\n if (unusedNodeTypes && unusedNodeTypes.length > 0) {\n appLogger(\n [\n 'Filtering out plugins:',\n unusedNodeTypes.map((key) => colorize(key, BLUE)).join(', '),\n ],\n {\n isVerbose: true,\n }\n );\n }\n\n env = {\n ...env,\n\n // Tree shacking based on unused node types\n ...formatNodeTypeToEnvVar(unusedNodeTypes),\n\n // Tree shacking based on config\n ...getConfigEnvVars(this.configuration),\n };\n }\n\n new webpack.DefinePlugin(env).apply(compiler);\n\n if (this.configuration.content.watch) {\n // Start watching (assuming watch is also async)\n await 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 appLogger(`Error in IntlayerPlugin: ${error}`, {\n level: 'error',\n });\n }\n }\n });\n }\n}\n"],"mappings":";;;;;;;;;;AAeA,IAAa,iBAAb,MAA4B;CAC1B,AAAQ,aAAa;CACrB,AAAQ;CAER,YAAY,eAAgC;EAC1C,KAAK,gBAAgB,iBAAiB,
|
|
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 { BLUE } from '@intlayer/config/colors';\nimport {\n formatNodeTypeToEnvVar,\n getConfigEnvVars,\n} from '@intlayer/config/envVars';\nimport { colorize, getAppLogger } from '@intlayer/config/logger';\nimport { getConfiguration } from '@intlayer/config/node';\nimport { getUnusedNodeTypesAsync } from '@intlayer/config/utils';\nimport { getDictionaries } from '@intlayer/dictionaries-entry';\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 const { webpack } = compiler;\n\n const isBuild = compiler.options.mode !== 'development';\n\n const appLogger = getAppLogger(this.configuration);\n\n let env: Record<string, string> = {};\n\n if (isBuild) {\n const dictionaries = getDictionaries(this.configuration);\n\n if (Object.keys(dictionaries).length === 0) {\n appLogger('No dictionaries found. Please check your configuration.', {\n isVerbose: true,\n });\n }\n\n const unusedNodeTypes = await getUnusedNodeTypesAsync(dictionaries);\n\n if (unusedNodeTypes && unusedNodeTypes.length > 0) {\n appLogger(\n [\n 'Filtering out plugins:',\n unusedNodeTypes.map((key) => colorize(key, BLUE)).join(', '),\n ],\n {\n isVerbose: true,\n }\n );\n }\n\n env = {\n ...env,\n\n // Tree shacking based on unused node types\n ...formatNodeTypeToEnvVar(unusedNodeTypes),\n\n // Tree shacking based on config\n ...getConfigEnvVars(this.configuration),\n };\n }\n\n new webpack.DefinePlugin(env).apply(compiler);\n\n if (this.configuration.content.watch) {\n // Start watching (assuming watch is also async)\n await 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 appLogger(`Error in IntlayerPlugin: ${error}`, {\n level: 'error',\n });\n }\n }\n });\n }\n}\n"],"mappings":";;;;;;;;;;AAeA,IAAa,iBAAb,MAA4B;CAC1B,AAAQ,aAAa;CACrB,AAAQ;CAER,YAAY,eAAgC;EAC1C,KAAK,gBAAgB,iBAAiB,iBAAiB;CACzD;CAEA,MAAM,MAAM,UAAmC;EAC7C,MAAM,EAAE,YAAY;EAEpB,MAAM,UAAU,SAAS,QAAQ,SAAS;EAE1C,MAAM,YAAY,aAAa,KAAK,aAAa;EAEjD,IAAI,MAA8B,CAAC;EAEnC,IAAI,SAAS;GACX,MAAM,eAAe,gBAAgB,KAAK,aAAa;GAEvD,IAAI,OAAO,KAAK,YAAY,EAAE,WAAW,GACvC,UAAU,2DAA2D,EACnE,WAAW,KACb,CAAC;GAGH,MAAM,kBAAkB,MAAM,wBAAwB,YAAY;GAElE,IAAI,mBAAmB,gBAAgB,SAAS,GAC9C,UACE,CACE,0BACA,gBAAgB,KAAK,QAAQ,SAAS,KAAK,IAAI,CAAC,EAAE,KAAK,IAAI,CAC7D,GACA,EACE,WAAW,KACb,CACF;GAGF,MAAM;IACJ,GAAG;IAGH,GAAG,uBAAuB,eAAe;IAGzC,GAAG,iBAAiB,KAAK,aAAa;GACxC;EACF;EAEA,IAAI,QAAQ,aAAa,GAAG,EAAE,MAAM,QAAQ;EAE5C,IAAI,KAAK,cAAc,QAAQ,OAE7B,MAAM,MAAM,EAAE,eAAe,KAAK,cAAc,CAAC;EAGnD,SAAS,MAAM,cAAc,WAAW,kBAAkB,YAAY;GACpE,IAAI,CAAC,KAAK,YACR,IAAI;IACF,MAAM,gBAAgB,KAAK,aAAa;IACxC,KAAK,aAAa;GACpB,SAAS,OAAO;IACd,UAAU,4BAA4B,SAAS,EAC7C,OAAO,QACT,CAAC;GACH;EAEJ,CAAC;CACH;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webpack.config.mjs","names":[],"sources":["../../src/webpack.config.ts"],"sourcesContent":["import { join } from 'node:path';\nimport { getConfiguration } from '@intlayer/config/node';\nimport type { IntlayerConfig } from '@intlayer/types/config';\n// @ts-ignore - Export exists\nimport type { Configuration as WebPackConfiguration } from 'webpack';\nimport type { Configuration as DevServerConfiguration } from 'webpack-dev-server';\nimport { getEntries } from './getEntries';\nimport { defineDirname } from './utils';\nimport { IntlayerPlugin } from './webpack-plugin';\n\n// For web interface\nexport const devServerConfig: DevServerConfiguration = {\n // Enable hot module replacement\n hot: true,\n // Open the browser\n open: false,\n liveReload: false,\n\n // Enable compression\n compress: true,\n\n // History API fallback\n historyApiFallback: false,\n\n // Host and port\n host: 'localhost',\n port: 8080,\n\n watchFiles: './src/', // derived from content.fileExtensions + content.contentDir\n\n devMiddleware: {\n // Enable write to disk to reuse the output\n writeToDisk: true,\n },\n\n // Content base\n static: {},\n};\n\nexport const getWebpackConfig = (\n configuration: IntlayerConfig = getConfiguration()\n): WebPackConfiguration => {\n const { fileExtensions } = configuration.content;\n\n /**\n * Set the __dirname global variable to make the config work in both ESM and CJS environments\n */\n defineDirname();\n\n const webpackConfig: WebPackConfiguration = {\n // Define the environment mode (development or production)\n mode: 'production', // or 'production'\n // Entry point of the application\n target: 'node', // Specifies the target environment\n\n entry: () => getEntries(configuration),\n output: {\n clean: true, // Clean the output directory before emit\n library: 'IntlLayerContent',\n libraryTarget: 'umd',\n filename: `[name].bundle.js`,\n },\n\n cache: false,\n\n devtool: 'source-map',\n\n // stats: {\n // preset: 'errors-only',\n // warnings: false,\n // },\n ignoreWarnings: [/./],\n resolve: {\n // Resolve TypeScript, JavaScript and JSON files\n extensions: [\n '.ts',\n '.js',\n '.json',\n '.wasm',\n '.ts',\n '.tsx',\n '.mjs',\n '.cjs',\n ],\n modules: [\n // To find the loader module\n join(globalThis.__dirname, '..', 'node_modules'), // In the project node_modules\n join(process.cwd(), 'node_modules'), // In the project node_modules\n join(process.cwd(), 'node_modules', 'intlayer-cli', 'node_modules'), // Or via another project by importing intlayer\n join(\n process.cwd(),\n 'node_modules',\n 'intlayer-cli',\n 'node_modules',\n '@intlayer/webpack',\n 'node_modules'\n ), // Or via another project by importing intlayer\n ],\n },\n\n resolveLoader: {\n // Configure how Webpack finds `loader` modules.\n modules: [\n // To find the loader module\n join(process.cwd(), 'node_modules'), // In the project node_modules\n join(\n process.cwd(),\n 'node_modules',\n '@intlayer/webpack',\n 'node_modules'\n ), // Or via another project by importing @intlayer/webpack\n join(\n process.cwd(),\n 'node_modules',\n 'intlayer-cli',\n 'node_modules',\n '@intlayer/webpack',\n 'node_modules'\n ), // Or via another project by importing intlayer\n ],\n },\n\n module: {\n rules: [\n {\n // Rule for .content.ts files\n test: new RegExp(`(${fileExtensions.join('|')})$`),\n use: [\n {\n // Transpile with esbuild-loader\n loader: 'esbuild-loader',\n options: {\n // JavaScript version to compile to\n target: 'es2015',\n },\n },\n // {\n // // Custom loader to process the transpiled code\n // loader: resolve('./intlayer-loader'),\n // },\n ],\n },\n {\n test: /\\.node$/,\n loader: 'node-loader',\n },\n // Use esbuild to compile JavaScript & TypeScript\n {\n // Match `.js`, `.jsx`, `.ts` or `.tsx` files\n test: /\\.(jsx|js|ts|tsx|mjs|cjs)?$/,\n loader: 'esbuild-loader',\n options: {\n // JavaScript version to compile to\n target: 'es2015',\n },\n },\n\n // JSON files are supported natively by Webpack 5, no specific loader required\n ],\n },\n devServer: devServerConfig,\n\n plugins: [new IntlayerPlugin(configuration)],\n };\n\n return webpackConfig;\n};\n\nexport default getWebpackConfig;\n"],"mappings":";;;;;;;AAWA,MAAa,kBAA0C;CAErD,KAAK;CAEL,MAAM;CACN,YAAY;CAGZ,UAAU;CAGV,oBAAoB;CAGpB,MAAM;CACN,MAAM;CAEN,YAAY;CAEZ,eAAe,EAEb,aAAa,
|
|
1
|
+
{"version":3,"file":"webpack.config.mjs","names":[],"sources":["../../src/webpack.config.ts"],"sourcesContent":["import { join } from 'node:path';\nimport { getConfiguration } from '@intlayer/config/node';\nimport type { IntlayerConfig } from '@intlayer/types/config';\n// @ts-ignore - Export exists\nimport type { Configuration as WebPackConfiguration } from 'webpack';\nimport type { Configuration as DevServerConfiguration } from 'webpack-dev-server';\nimport { getEntries } from './getEntries';\nimport { defineDirname } from './utils';\nimport { IntlayerPlugin } from './webpack-plugin';\n\n// For web interface\nexport const devServerConfig: DevServerConfiguration = {\n // Enable hot module replacement\n hot: true,\n // Open the browser\n open: false,\n liveReload: false,\n\n // Enable compression\n compress: true,\n\n // History API fallback\n historyApiFallback: false,\n\n // Host and port\n host: 'localhost',\n port: 8080,\n\n watchFiles: './src/', // derived from content.fileExtensions + content.contentDir\n\n devMiddleware: {\n // Enable write to disk to reuse the output\n writeToDisk: true,\n },\n\n // Content base\n static: {},\n};\n\nexport const getWebpackConfig = (\n configuration: IntlayerConfig = getConfiguration()\n): WebPackConfiguration => {\n const { fileExtensions } = configuration.content;\n\n /**\n * Set the __dirname global variable to make the config work in both ESM and CJS environments\n */\n defineDirname();\n\n const webpackConfig: WebPackConfiguration = {\n // Define the environment mode (development or production)\n mode: 'production', // or 'production'\n // Entry point of the application\n target: 'node', // Specifies the target environment\n\n entry: () => getEntries(configuration),\n output: {\n clean: true, // Clean the output directory before emit\n library: 'IntlLayerContent',\n libraryTarget: 'umd',\n filename: `[name].bundle.js`,\n },\n\n cache: false,\n\n devtool: 'source-map',\n\n // stats: {\n // preset: 'errors-only',\n // warnings: false,\n // },\n ignoreWarnings: [/./],\n resolve: {\n // Resolve TypeScript, JavaScript and JSON files\n extensions: [\n '.ts',\n '.js',\n '.json',\n '.wasm',\n '.ts',\n '.tsx',\n '.mjs',\n '.cjs',\n ],\n modules: [\n // To find the loader module\n join(globalThis.__dirname, '..', 'node_modules'), // In the project node_modules\n join(process.cwd(), 'node_modules'), // In the project node_modules\n join(process.cwd(), 'node_modules', 'intlayer-cli', 'node_modules'), // Or via another project by importing intlayer\n join(\n process.cwd(),\n 'node_modules',\n 'intlayer-cli',\n 'node_modules',\n '@intlayer/webpack',\n 'node_modules'\n ), // Or via another project by importing intlayer\n ],\n },\n\n resolveLoader: {\n // Configure how Webpack finds `loader` modules.\n modules: [\n // To find the loader module\n join(process.cwd(), 'node_modules'), // In the project node_modules\n join(\n process.cwd(),\n 'node_modules',\n '@intlayer/webpack',\n 'node_modules'\n ), // Or via another project by importing @intlayer/webpack\n join(\n process.cwd(),\n 'node_modules',\n 'intlayer-cli',\n 'node_modules',\n '@intlayer/webpack',\n 'node_modules'\n ), // Or via another project by importing intlayer\n ],\n },\n\n module: {\n rules: [\n {\n // Rule for .content.ts files\n test: new RegExp(`(${fileExtensions.join('|')})$`),\n use: [\n {\n // Transpile with esbuild-loader\n loader: 'esbuild-loader',\n options: {\n // JavaScript version to compile to\n target: 'es2015',\n },\n },\n // {\n // // Custom loader to process the transpiled code\n // loader: resolve('./intlayer-loader'),\n // },\n ],\n },\n {\n test: /\\.node$/,\n loader: 'node-loader',\n },\n // Use esbuild to compile JavaScript & TypeScript\n {\n // Match `.js`, `.jsx`, `.ts` or `.tsx` files\n test: /\\.(jsx|js|ts|tsx|mjs|cjs)?$/,\n loader: 'esbuild-loader',\n options: {\n // JavaScript version to compile to\n target: 'es2015',\n },\n },\n\n // JSON files are supported natively by Webpack 5, no specific loader required\n ],\n },\n devServer: devServerConfig,\n\n plugins: [new IntlayerPlugin(configuration)],\n };\n\n return webpackConfig;\n};\n\nexport default getWebpackConfig;\n"],"mappings":";;;;;;;AAWA,MAAa,kBAA0C;CAErD,KAAK;CAEL,MAAM;CACN,YAAY;CAGZ,UAAU;CAGV,oBAAoB;CAGpB,MAAM;CACN,MAAM;CAEN,YAAY;CAEZ,eAAe,EAEb,aAAa,KACf;CAGA,QAAQ,CAAC;AACX;AAEA,MAAa,oBACX,gBAAgC,iBAAiB,MACxB;CACzB,MAAM,EAAE,mBAAmB,cAAc;;;;CAKzC,cAAc;CAsHd,OAAO;EAlHL,MAAM;EAEN,QAAQ;EAER,aAAa,WAAW,aAAa;EACrC,QAAQ;GACN,OAAO;GACP,SAAS;GACT,eAAe;GACf,UAAU;EACZ;EAEA,OAAO;EAEP,SAAS;EAMT,gBAAgB,CAAC,GAAG;EACpB,SAAS;GAEP,YAAY;IACV;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACF;GACA,SAAS;IAEP,KAAK,WAAW,WAAW,MAAM,cAAc;IAC/C,KAAK,QAAQ,IAAI,GAAG,cAAc;IAClC,KAAK,QAAQ,IAAI,GAAG,gBAAgB,gBAAgB,cAAc;IAClE,KACE,QAAQ,IAAI,GACZ,gBACA,gBACA,gBACA,qBACA,cACF;GACF;EACF;EAEA,eAAe,EAEb,SAAS;GAEP,KAAK,QAAQ,IAAI,GAAG,cAAc;GAClC,KACE,QAAQ,IAAI,GACZ,gBACA,qBACA,cACF;GACA,KACE,QAAQ,IAAI,GACZ,gBACA,gBACA,gBACA,qBACA,cACF;EACF,EACF;EAEA,QAAQ,EACN,OAAO;GACL;IAEE,MAAM,IAAI,OAAO,IAAI,eAAe,KAAK,GAAG,EAAE,GAAG;IACjD,KAAK,CACH;KAEE,QAAQ;KACR,SAAS,EAEP,QAAQ,SACV;IACF,CAKF;GACF;GACA;IACE,MAAM;IACN,QAAQ;GACV;GAEA;IAEE,MAAM;IACN,QAAQ;IACR,SAAS,EAEP,QAAQ,SACV;GACF;EAGF,EACF;EACA,WAAW;EAEX,SAAS,CAAC,IAAI,eAAe,aAAa,CAAC;CAG1B;AACrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webpack.config.d.ts","names":[],"sources":["../../src/webpack.config.ts"],"mappings":";;;;;cAWa,eAAA,EAAiB,
|
|
1
|
+
{"version":3,"file":"webpack.config.d.ts","names":[],"sources":["../../src/webpack.config.ts"],"mappings":";;;;;cAWa,eAAA,EAAiB,eA0B7B;AAAA,cAEY,gBAAA,GACX,aAAA,GAAe,cAAA,KACd,aA6HF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/webpack",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.10.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": [
|
|
@@ -77,16 +77,16 @@
|
|
|
77
77
|
"watch": "webpack --config ./webpack.config.ts --watch"
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {
|
|
80
|
-
"@intlayer/chokidar": "8.
|
|
81
|
-
"@intlayer/config": "8.
|
|
82
|
-
"@intlayer/dictionaries-entry": "8.
|
|
83
|
-
"@intlayer/types": "8.
|
|
80
|
+
"@intlayer/chokidar": "8.10.0-canary.0",
|
|
81
|
+
"@intlayer/config": "8.10.0-canary.0",
|
|
82
|
+
"@intlayer/dictionaries-entry": "8.10.0-canary.0",
|
|
83
|
+
"@intlayer/types": "8.10.0-canary.0",
|
|
84
84
|
"fast-glob": "3.3.3",
|
|
85
85
|
"webpack": "5.106.2",
|
|
86
86
|
"webpack-dev-server": "5.2.3"
|
|
87
87
|
},
|
|
88
88
|
"devDependencies": {
|
|
89
|
-
"@types/node": "25.
|
|
89
|
+
"@types/node": "25.9.0",
|
|
90
90
|
"@utils/ts-config": "1.0.4",
|
|
91
91
|
"@utils/ts-config-types": "1.0.4",
|
|
92
92
|
"@utils/tsdown-config": "1.0.4",
|