@intlayer/webpack 5.5.0-canary.0 → 5.5.1
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,14 +23,12 @@ __export(webpack_config_exports, {
|
|
|
23
23
|
webpackConfig: () => webpackConfig
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(webpack_config_exports);
|
|
26
|
-
var import_path = require("path");
|
|
27
26
|
var import_config = require("@intlayer/config");
|
|
27
|
+
var import_path = require("path");
|
|
28
28
|
var import_getEntries = require('./getEntries.cjs');
|
|
29
29
|
var import_utils = require('./utils.cjs');
|
|
30
30
|
var import_webpack_plugin = require('./webpack-plugin.cjs');
|
|
31
|
-
const { content } = (0, import_config.getConfiguration)(
|
|
32
|
-
verbose: false
|
|
33
|
-
});
|
|
31
|
+
const { content } = (0, import_config.getConfiguration)();
|
|
34
32
|
const { fileExtensions } = content;
|
|
35
33
|
(0, import_utils.defineDirname)();
|
|
36
34
|
const devServerConfig = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/webpack.config.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../src/webpack.config.ts"],"sourcesContent":["import { getConfiguration } from '@intlayer/config';\nimport { join } from 'path';\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\nconst { content } = getConfiguration();\nconst { fileExtensions } = content;\n\n/**\n * Set the __dirname global variable to make the config work in both ESM and CJS environments\n */\ndefineDirname();\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/', // watchedFilesPatternWithPath,\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 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,\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: ['.ts', '.js', '.json', '.wasm', '.ts', '.tsx', '.mjs', '.cjs'],\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(process.cwd(), 'node_modules', '@intlayer/webpack', 'node_modules'), // 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: [\n new IntlayerPlugin(),\n // new HotModuleReplacementPlugin()\n ],\n};\n\nexport default webpackConfig;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAiC;AACjC,kBAAqB;AAGrB,wBAA2B;AAC3B,mBAA8B;AAC9B,4BAA+B;AAE/B,MAAM,EAAE,QAAQ,QAAI,gCAAiB;AACrC,MAAM,EAAE,eAAe,IAAI;AAAA,IAK3B,4BAAc;AAGP,MAAM,kBAA0C;AAAA;AAAA,EAErD,KAAK;AAAA;AAAA,EAEL,MAAM;AAAA,EACN,YAAY;AAAA;AAAA,EAGZ,UAAU;AAAA;AAAA,EAGV,oBAAoB;AAAA;AAAA,EAGpB,MAAM;AAAA,EACN,MAAM;AAAA,EAEN,YAAY;AAAA;AAAA,EAEZ,eAAe;AAAA;AAAA,IAEb,aAAa;AAAA,EACf;AAAA;AAAA,EAGA,QAAQ,CAAC;AACX;AAEO,MAAM,gBAAsC;AAAA;AAAA,EAEjD,MAAM;AAAA;AAAA;AAAA,EAEN,QAAQ;AAAA;AAAA,EAER,OAAO;AAAA,EACP,QAAQ;AAAA,IACN,OAAO;AAAA;AAAA,IACP,SAAS;AAAA,IACT,eAAe;AAAA,IACf,UAAU;AAAA,EACZ;AAAA,EAEA,OAAO;AAAA,EAEP,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA,EAMT,gBAAgB,CAAC,GAAG;AAAA,EACpB,SAAS;AAAA;AAAA,IAEP,YAAY,CAAC,OAAO,OAAO,SAAS,SAAS,OAAO,QAAQ,QAAQ,MAAM;A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1,11 +1,9 @@
|
|
|
1
|
-
import { join } from "path";
|
|
2
1
|
import { getConfiguration } from "@intlayer/config";
|
|
2
|
+
import { join } from "path";
|
|
3
3
|
import { getEntries } from "./getEntries.mjs";
|
|
4
4
|
import { defineDirname } from "./utils.mjs";
|
|
5
5
|
import { IntlayerPlugin } from "./webpack-plugin.mjs";
|
|
6
|
-
const { content } = getConfiguration(
|
|
7
|
-
verbose: false
|
|
8
|
-
});
|
|
6
|
+
const { content } = getConfiguration();
|
|
9
7
|
const { fileExtensions } = content;
|
|
10
8
|
defineDirname();
|
|
11
9
|
const devServerConfig = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/webpack.config.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../src/webpack.config.ts"],"sourcesContent":["import { getConfiguration } from '@intlayer/config';\nimport { join } from 'path';\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\nconst { content } = getConfiguration();\nconst { fileExtensions } = content;\n\n/**\n * Set the __dirname global variable to make the config work in both ESM and CJS environments\n */\ndefineDirname();\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/', // watchedFilesPatternWithPath,\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 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,\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: ['.ts', '.js', '.json', '.wasm', '.ts', '.tsx', '.mjs', '.cjs'],\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(process.cwd(), 'node_modules', '@intlayer/webpack', 'node_modules'), // 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: [\n new IntlayerPlugin(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A;AAAA,IACF;AAAA,EACF;AAAA,EAEA,eAAe;AAAA;AAAA,IAEb,SAAS;AAAA;AAAA,MAEP,KAAK,QAAQ,IAAI,GAAG,cAAc;AAAA;AAAA,MAClC,KAAK,QAAQ,IAAI,GAAG,gBAAgB,qBAAqB,cAAc;AAAA;AAAA,MACvE;AAAA,QACE,QAAQ,IAAI;AAAA,QACZ;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA;AAAA,IACF;AAAA,EACF;AAAA,EAEA,QAAQ;AAAA,IACN,OAAO;AAAA,MACL;AAAA;AAAA,QAEE,MAAM,IAAI,OAAO,IAAI,eAAe,KAAK,GAAG,CAAC,IAAI;AAAA,QACjD,KAAK;AAAA,UACH;AAAA;AAAA,YAEE,QAAQ;AAAA,YACR,SAAS;AAAA;AAAA,cAEP,QAAQ;AAAA,YACV;AAAA,UACF;AAAA;AAAA;AAAA;AAAA;AAAA,QAKF;AAAA,MACF;AAAA,MACA;AAAA,QACE,MAAM;AAAA,QACN,QAAQ;AAAA,MACV;AAAA;AAAA,MAEA;AAAA;AAAA,QAEE,MAAM;AAAA,QACN,QAAQ;AAAA,QACR,SAAS;AAAA;AAAA,UAEP,QAAQ;AAAA,QACV;AAAA,MACF;AAAA;AAAA,IAGF;AAAA,EACF;AAAA,EACA,WAAW;AAAA,EAEX,SAAS;AAAA,IACP,IAAI,eAAe;AAAA;AAAA,EAErB;AACF;AAEA,IAAO,yBAAQ;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webpack.config.d.ts","sourceRoot":"","sources":["../../src/webpack.config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,IAAI,oBAAoB,EAAE,MAAM,SAAS,CAAC;AACrE,OAAO,KAAK,EAAE,aAAa,IAAI,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"webpack.config.d.ts","sourceRoot":"","sources":["../../src/webpack.config.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,IAAI,oBAAoB,EAAE,MAAM,SAAS,CAAC;AACrE,OAAO,KAAK,EAAE,aAAa,IAAI,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAclF,eAAO,MAAM,eAAe,EAAE,sBA0B7B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,oBAuG3B,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/webpack",
|
|
3
|
-
"version": "5.5.
|
|
3
|
+
"version": "5.5.1",
|
|
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.98.0",
|
|
63
63
|
"webpack-dev-server": "^5.2.0",
|
|
64
|
-
"@intlayer/config": "5.5.
|
|
65
|
-
"@intlayer/chokidar": "5.5.
|
|
64
|
+
"@intlayer/config": "5.5.1",
|
|
65
|
+
"@intlayer/chokidar": "5.5.1"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@changesets/cli": "2.28.1",
|
|
@@ -76,16 +76,16 @@
|
|
|
76
76
|
"tsc-alias": "^1.8.11",
|
|
77
77
|
"tsup": "^8.4.0",
|
|
78
78
|
"typescript": "^5.8.2",
|
|
79
|
-
"@utils/
|
|
79
|
+
"@utils/ts-config-types": "1.0.4",
|
|
80
80
|
"@utils/ts-config": "1.0.4",
|
|
81
|
-
"@utils/
|
|
82
|
-
"@utils/
|
|
81
|
+
"@utils/eslint-config": "1.0.4",
|
|
82
|
+
"@utils/tsup-config": "1.0.4"
|
|
83
83
|
},
|
|
84
84
|
"peerDependencies": {
|
|
85
85
|
"webpack": "^5.96.1",
|
|
86
|
-
"@intlayer/chokidar": "5.5.
|
|
87
|
-
"@intlayer/config": "5.5.
|
|
88
|
-
"@intlayer/api": "5.5.
|
|
86
|
+
"@intlayer/chokidar": "5.5.1",
|
|
87
|
+
"@intlayer/config": "5.5.1",
|
|
88
|
+
"@intlayer/api": "5.5.1"
|
|
89
89
|
},
|
|
90
90
|
"engines": {
|
|
91
91
|
"node": ">=14.18"
|