@raisenow/tamaro-cli 1.0.9 → 1.0.12

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,175 +1,68 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
9
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10
- var __spreadValues = (a, b) => {
11
- for (var prop in b || (b = {}))
12
- if (__hasOwnProp.call(b, prop))
13
- __defNormalProp(a, prop, b[prop]);
14
- if (__getOwnPropSymbols)
15
- for (var prop of __getOwnPropSymbols(b)) {
16
- if (__propIsEnum.call(b, prop))
17
- __defNormalProp(a, prop, b[prop]);
18
- }
19
- return a;
20
- };
21
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
22
- var __export = (target, all) => {
23
- for (var name in all)
24
- __defProp(target, name, { get: all[name], enumerable: true });
25
- };
26
- var __reExport = (target, module2, copyDefault, desc) => {
27
- if (module2 && typeof module2 === "object" || typeof module2 === "function") {
28
- for (let key of __getOwnPropNames(module2))
29
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
30
- __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
31
- }
32
- return target;
33
- };
34
- var __toESM = (module2, isNodeMode) => {
35
- return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
36
- };
37
- var __toCommonJS = /* @__PURE__ */ ((cache) => {
38
- return (module2, temp) => {
39
- return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
40
- };
41
- })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
1
+ import {
2
+ __spreadValues,
3
+ extensions,
4
+ getIfCoreFns,
5
+ getPaths,
6
+ getRelativePaths,
7
+ getWidgetUuid,
8
+ logDataTable,
9
+ logTitle,
10
+ moduleFileExtensions,
11
+ resolveApp
12
+ } from "./chunk-PIEFLCDU.js";
42
13
 
43
14
  // src/webpack.config.ts
44
- var webpack_config_exports = {};
45
- __export(webpack_config_exports, {
46
- default: () => webpack_config_default
47
- });
48
- var import_path2 = require("path");
49
- var import_fs2 = require("fs");
50
- var import_glob = __toESM(require("glob"));
51
- var import_webpack_config_utils2 = require("webpack-config-utils");
52
- var import_webpack = __toESM(require("webpack"));
53
- var import_portfinder = require("portfinder");
54
- var import_tsconfig_paths_webpack_plugin = require("tsconfig-paths-webpack-plugin");
55
- var import_clean_webpack_plugin = require("clean-webpack-plugin");
56
- var import_html_webpack_plugin2 = __toESM(require("html-webpack-plugin"));
57
- var import_fork_ts_checker_webpack_plugin = __toESM(require("fork-ts-checker-webpack-plugin"));
58
- var import_react_refresh_webpack_plugin = __toESM(require("@pmmmwh/react-refresh-webpack-plugin"));
59
- var import_mini_css_extract_plugin = __toESM(require("mini-css-extract-plugin"));
60
- var import_css_minimizer_webpack_plugin = __toESM(require("css-minimizer-webpack-plugin"));
61
- var import_eslint_webpack_plugin = __toESM(require("eslint-webpack-plugin"));
62
- var import_copy_webpack_plugin = __toESM(require("copy-webpack-plugin"));
63
- var import_webpack_plugin = __toESM(require("@statoscope/webpack-plugin"));
15
+ import { createRequire as createRequire2 } from "module";
16
+ import { basename, dirname } from "path";
17
+ import { existsSync } from "fs";
18
+ import glob from "glob";
19
+ import { getIfUtils, removeEmpty } from "webpack-config-utils";
20
+ import webpack from "webpack";
21
+ import { TsconfigPathsPlugin } from "tsconfig-paths-webpack-plugin";
22
+ import { CleanWebpackPlugin } from "clean-webpack-plugin";
23
+ import HtmlWebpackPlugin2 from "html-webpack-plugin";
24
+ import ForkTsCheckerWebpackPlugin from "fork-ts-checker-webpack-plugin";
25
+ import ReactRefreshWebpackPlugin from "@pmmmwh/react-refresh-webpack-plugin";
26
+ import MiniCssExtractPlugin from "mini-css-extract-plugin";
27
+ import CssMinimizerPlugin from "css-minimizer-webpack-plugin";
28
+ import ESLintPlugin from "eslint-webpack-plugin";
29
+ import CopyPlugin from "copy-webpack-plugin";
30
+ import StatoscopeWebpackPlugin from "@statoscope/webpack-plugin";
64
31
 
65
32
  // src/lib/InterpolateHtmlPlugin.ts
66
- var import_html_webpack_plugin = __toESM(require("html-webpack-plugin"));
67
- var import_escape_string_regexp = __toESM(require("escape-string-regexp"));
33
+ import HtmlWebpackPlugin from "html-webpack-plugin";
34
+ import escapeStringRegexp from "escape-string-regexp";
35
+ var PLUGIN_NAME = "InterpolateHtmlPlugin";
68
36
  var InterpolateHtmlPlugin = class {
69
37
  replacements;
70
38
  constructor(replacements) {
71
39
  this.replacements = __spreadValues({}, replacements);
72
40
  }
73
41
  apply(compiler) {
74
- compiler.hooks.compilation.tap("InterpolateHtmlPlugin", (compilation) => {
75
- const hooks = import_html_webpack_plugin.default.getHooks(compilation);
76
- hooks.alterAssetTagGroups.tap("InterpolateHtmlPlugin", (assets) => {
42
+ compiler.hooks.compilation.tap(PLUGIN_NAME, (compilation) => {
43
+ const hooks = HtmlWebpackPlugin.getHooks(compilation);
44
+ hooks.alterAssetTagGroups.tap(PLUGIN_NAME, (assets) => {
77
45
  this.replacements["ENTRY"] = assets.headTags[0].attributes["src"];
78
46
  return assets;
79
47
  });
80
- hooks.afterTemplateExecution.tap("InterpolateHtmlPlugin", (data) => {
48
+ hooks.afterTemplateExecution.tap(PLUGIN_NAME, (data) => {
81
49
  Object.entries(this.replacements).forEach(([key, value]) => {
82
- data.html = data.html.replace(new RegExp(`%${(0, import_escape_string_regexp.default)(key)}%`, "g"), value);
50
+ data.html = data.html.replace(new RegExp(`%${escapeStringRegexp(key)}%`, "g"), value);
83
51
  });
84
52
  return data;
85
53
  });
86
54
  });
87
55
  }
88
56
  };
89
- var InterpolateHtmlPlugin_default = InterpolateHtmlPlugin;
90
57
 
91
- // src/lib/helpers.ts
92
- var import_path = require("path");
93
- var import_fs = require("fs");
94
- var import_chalk = __toESM(require("chalk"));
95
- var import_node_notifier = __toESM(require("node-notifier"));
96
- var import_webpack_config_utils = require("webpack-config-utils");
97
- var import_columnify = __toESM(require("columnify"));
98
- var import_boxen = __toESM(require("boxen"));
99
- var import_dotenv_expand = require("dotenv-expand");
100
- var import_dotenv = require("dotenv");
101
- var import_open = __toESM(require("open"));
102
- var import_strip_indent = __toESM(require("strip-indent"));
103
- var import_execa = require("execa");
104
- var TAMARO_CORE_PACKAGE_NAMES = ["@raisenow/tamaro-core"];
105
- var TAMARO_CONFIGURATIONS_PACKAGE_NAMES = ["@raisenow/tamaro-configurations"];
106
- var getIfCoreFns = () => {
107
- const corePkgPath = resolveApp("package.json");
108
- const configsPkgPath = resolveApp("../../package.json");
109
- if ((0, import_fs.existsSync)(corePkgPath)) {
110
- const { name } = require(corePkgPath);
111
- if (TAMARO_CORE_PACKAGE_NAMES.includes(name)) {
112
- return (0, import_webpack_config_utils.getIfUtils)({ core: true }, ["core"]);
113
- }
114
- }
115
- if ((0, import_fs.existsSync)(configsPkgPath)) {
116
- const { name } = require(configsPkgPath);
117
- if (TAMARO_CONFIGURATIONS_PACKAGE_NAMES.includes(name)) {
118
- return (0, import_webpack_config_utils.getIfUtils)({ core: false }, ["core"]);
119
- }
120
- }
121
- logError((0, import_strip_indent.default)(` You must run "npx @raisenow/tamaro-cli" commands from:
122
- 1. Root of "${import_chalk.default.bold(TAMARO_CORE_PACKAGE_NAMES[0])}" package folder.
123
- 2. Root of particular customer configuration folder of "${import_chalk.default.bold(TAMARO_CONFIGURATIONS_PACKAGE_NAMES[0])}" package.
124
- You are currently in "${import_chalk.default.bold((0, import_fs.realpathSync)(process.cwd()))}".
125
- `));
126
- process.exit(1);
127
- };
128
- var moduleFileExtensions = ["ts", "tsx", "js", "jsx"];
129
- var extensions = moduleFileExtensions.map((v) => `.${v}`);
130
- var resolveApp = (relativePath) => (0, import_path.resolve)((0, import_fs.realpathSync)(process.cwd()), relativePath);
131
- var resolveOwn = (relativePath) => (0, import_path.resolve)(__dirname, "..", relativePath);
132
- var resolveModule = (resolveFn, filePath) => {
133
- const extension = moduleFileExtensions.find((extension2) => (0, import_fs.existsSync)(resolveFn(`${filePath}.${extension2}`)));
134
- if (extension) {
135
- return resolveFn(`${filePath}.${extension}`);
136
- }
137
- return resolveFn(`${filePath}.js`);
138
- };
139
- var getWidgetUuid = () => (0, import_path.basename)(resolveApp("."));
140
- var getPaths = (ifCore) => {
141
- return ifCore({
142
- app: resolveApp("."),
143
- appEntry: resolveModule(resolveApp, "src/index"),
144
- appDist: resolveApp("dist"),
145
- appNodeModules: resolveApp("node_modules"),
146
- appTsConfig: resolveApp("tsconfig.json"),
147
- appHtml: resolveApp("src/*.html"),
148
- appEnv: resolveApp(".env"),
149
- appTailwindConfig: resolveApp("tailwind.config.js")
150
- }, {
151
- app: resolveApp("."),
152
- appEntry: resolveModule(resolveApp, "widget"),
153
- appDist: resolveApp(`../../dist/${getWidgetUuid()}`),
154
- appNodeModules: resolveApp("../../node_modules"),
155
- appTsConfig: resolveApp("tsconfig.json"),
156
- appHtml: resolveApp("*.html"),
157
- appEnv: resolveApp(".env"),
158
- appTailwindConfig: void 0
159
- });
160
- };
161
- var getRelativePaths = (paths) => {
162
- const relativePaths = {};
163
- for (const [type, absPath] of Object.entries(paths)) {
164
- if (absPath) {
165
- relativePaths[type] = (0, import_path.relative)("./", absPath) || ".";
166
- }
167
- }
168
- return relativePaths;
169
- };
58
+ // src/lib/env.ts
59
+ import { createRequire } from "module";
60
+ import { expand as dotenvExpand } from "dotenv-expand";
61
+ import { config as dotenvConfig } from "dotenv";
62
+ var require2 = createRequire(import.meta.url);
170
63
  var getEnvVars = (filePath, ifMin, ifCore, ifLocalCore) => {
171
64
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
172
- (0, import_dotenv_expand.expand)((0, import_dotenv.config)({ path: filePath }));
65
+ dotenvExpand(dotenvConfig({ path: filePath }));
173
66
  (_b = (_a = process.env).NODE_ENV) != null ? _b : _a.NODE_ENV = ifMin("production", "development");
174
67
  (_d = (_c = process.env).BABEL_ENV) != null ? _d : _c.BABEL_ENV = ifMin("production", "development");
175
68
  (_f = (_e = process.env).EXPOSE_VAR) != null ? _f : _e.EXPOSE_VAR = ifCore("rnw.tamaroCore", "rnw.tamaro");
@@ -179,7 +72,7 @@ var getEnvVars = (filePath, ifMin, ifCore, ifLocalCore) => {
179
72
  if (ifCore()) {
180
73
  process.env.PRODUCT_NAME = "tamaro";
181
74
  const corePkgPath = resolveApp("package.json");
182
- const { version } = require(corePkgPath);
75
+ const { version } = require2(corePkgPath);
183
76
  process.env.PRODUCT_VERSION = version;
184
77
  }
185
78
  if (!ifCore()) {
@@ -217,54 +110,29 @@ var getEnvVars = (filePath, ifMin, ifCore, ifLocalCore) => {
217
110
  };
218
111
  return { raw, stringified };
219
112
  };
220
- var logError = (message) => {
221
- if (message) {
222
- console.log(import_chalk.default.red(message));
223
- }
224
- };
225
- var logDataTable = (vars, title) => {
226
- logTable((0, import_columnify.default)(vars, { showHeaders: false }), title);
227
- };
228
- var logTable = (text, title) => {
229
- let out = "";
230
- const boxTitle = title ? import_chalk.default.bold(`${title}`) : void 0;
231
- if (boxTitle) {
232
- out += `${boxTitle}
233
- `;
234
- }
235
- out += text;
236
- console.log((0, import_boxen.default)(out, {
237
- margin: 0,
238
- padding: {
239
- top: 0,
240
- right: 1,
241
- bottom: 0,
242
- left: 1
243
- },
244
- borderColor: "green"
245
- }));
246
- };
247
113
 
248
114
  // src/webpack.config.ts
115
+ var require3 = createRequire2(import.meta.url);
249
116
  var imageInlineSizeLimit = 0;
250
117
  var getWebpackConfig = async (env) => {
251
- const { ifMin, ifNotMin } = (0, import_webpack_config_utils2.getIfUtils)(env, ["min"]);
252
- const { ifAnalyze } = (0, import_webpack_config_utils2.getIfUtils)(env, ["analyze"]);
253
- const { ifLocalCore } = (0, import_webpack_config_utils2.getIfUtils)(env, ["localCore"]);
118
+ const { ifMin, ifNotMin } = getIfUtils(env, ["min"]);
119
+ const { ifAnalyze } = getIfUtils(env, ["analyze"]);
120
+ const { ifLocalCore } = getIfUtils(env, ["localCore"]);
254
121
  const { ifCore } = getIfCoreFns();
255
122
  const paths = getPaths(ifCore);
256
- const appHtmlFiles = import_glob.default.sync(paths.appHtml);
123
+ const appHtmlFiles = glob.sync(paths.appHtml);
257
124
  const envVars = getEnvVars(paths.appEnv, ifMin, ifCore, ifLocalCore);
258
- const { ifHmr } = (0, import_webpack_config_utils2.getIfUtils)({ hmr: process.env.HMR_ENABLED === "true" }, ["hmr"]);
259
- const port = await (0, import_portfinder.getPortPromise)({ port: 1234 });
260
- const useTailwind = ifCore() && paths.appTailwindConfig && (0, import_fs2.existsSync)(paths.appTailwindConfig);
261
- logDataTable(getRelativePaths(paths), "Paths");
262
- logDataTable(envVars.raw, "Environment variables");
125
+ const { ifHmr } = getIfUtils({ hmr: process.env.HMR_ENABLED === "true" }, ["hmr"]);
126
+ const useTailwind = ifCore() && paths.appTailwindConfig && existsSync(paths.appTailwindConfig);
127
+ logTitle("Paths:");
128
+ logDataTable(getRelativePaths(paths));
129
+ logTitle("Environment variables:");
130
+ logDataTable(envVars.raw);
263
131
  const getCssLoaders = (cssOptions = {}) => {
264
- return (0, import_webpack_config_utils2.removeEmpty)([
265
- ifMin({ loader: import_mini_css_extract_plugin.default.loader }),
132
+ return removeEmpty([
133
+ ifMin({ loader: MiniCssExtractPlugin.loader }),
266
134
  ifNotMin({
267
- loader: require.resolve("style-loader"),
135
+ loader: require3.resolve("style-loader"),
268
136
  options: {
269
137
  attributes: {
270
138
  "data-widget": process.env.ELEMENT_ATTRIBUTE_DATA_WIDGET
@@ -272,35 +140,35 @@ var getWebpackConfig = async (env) => {
272
140
  }
273
141
  }),
274
142
  {
275
- loader: require.resolve("css-loader"),
143
+ loader: require3.resolve("css-loader"),
276
144
  options: __spreadValues({
277
145
  sourceMap: ifNotMin(),
278
146
  importLoaders: 3
279
147
  }, cssOptions)
280
148
  },
281
149
  {
282
- loader: require.resolve("postcss-loader"),
150
+ loader: require3.resolve("postcss-loader"),
283
151
  options: {
284
152
  postcssOptions: {
285
- plugins: (0, import_webpack_config_utils2.removeEmpty)([
153
+ plugins: removeEmpty([
286
154
  useTailwind ? [
287
- require.resolve("tailwindcss", {
155
+ require3.resolve("tailwindcss", {
288
156
  paths: [paths.appNodeModules]
289
157
  }),
290
158
  paths.appTailwindConfig
291
159
  ] : void 0,
292
- require.resolve("postcss-custom-properties"),
293
- require.resolve("autoprefixer")
160
+ require3.resolve("postcss-custom-properties"),
161
+ require3.resolve("autoprefixer")
294
162
  ])
295
163
  }
296
164
  }
297
165
  },
298
166
  {
299
- loader: require.resolve("resolve-url-loader"),
167
+ loader: require3.resolve("resolve-url-loader"),
300
168
  options: { sourceMap: ifNotMin() }
301
169
  },
302
170
  {
303
- loader: require.resolve("sass-loader"),
171
+ loader: require3.resolve("sass-loader"),
304
172
  options: { sourceMap: true }
305
173
  }
306
174
  ]);
@@ -312,13 +180,13 @@ var getWebpackConfig = async (env) => {
312
180
  extensions: [...extensions, "..."],
313
181
  modules: ["node_modules", paths.appNodeModules],
314
182
  plugins: [
315
- new import_tsconfig_paths_webpack_plugin.TsconfigPathsPlugin({
183
+ new TsconfigPathsPlugin({
316
184
  configFile: paths.appTsConfig,
317
185
  extensions
318
186
  })
319
187
  ]
320
188
  },
321
- entry: [resolveOwn("src/lib/polyfills.js"), paths.appEntry],
189
+ entry: paths.appEntry,
322
190
  output: {
323
191
  publicPath: "auto",
324
192
  path: ifMin(paths.appDist, void 0),
@@ -340,12 +208,12 @@ var getWebpackConfig = async (env) => {
340
208
  errorDetails: true
341
209
  }),
342
210
  module: {
343
- rules: (0, import_webpack_config_utils2.removeEmpty)([
211
+ rules: removeEmpty([
344
212
  ifNotMin({
345
213
  enforce: "pre",
346
214
  exclude: /@babel\/runtime/,
347
215
  test: /\.(js|jsx|ts|tsx|css|scss)$/,
348
- use: require.resolve("source-map-loader")
216
+ use: require3.resolve("source-map-loader")
349
217
  }),
350
218
  {
351
219
  oneOf: [
@@ -356,42 +224,42 @@ var getWebpackConfig = async (env) => {
356
224
  resolveApp("node_modules/micromark"),
357
225
  resolveApp("node_modules/decode-named-character-reference")
358
226
  ], [resolveApp("."), resolveApp("../../src")]),
359
- loader: require.resolve("babel-loader"),
227
+ loader: require3.resolve("babel-loader"),
360
228
  options: {
361
229
  babelrc: false,
362
230
  configFile: false,
363
231
  sourceMaps: ifNotMin(),
364
232
  inputSourceMap: ifNotMin(),
365
233
  presets: [
366
- require.resolve("@babel/preset-env"),
234
+ require3.resolve("@babel/preset-env"),
367
235
  [
368
- require.resolve("@babel/preset-typescript"),
236
+ require3.resolve("@babel/preset-typescript"),
369
237
  {
370
238
  allowDeclareFields: true
371
239
  }
372
240
  ],
373
- require.resolve("@babel/preset-react")
241
+ require3.resolve("@babel/preset-react")
374
242
  ],
375
- plugins: (0, import_webpack_config_utils2.removeEmpty)([
243
+ plugins: removeEmpty([
376
244
  [
377
- require.resolve("@babel/plugin-transform-runtime"),
245
+ require3.resolve("@babel/plugin-transform-runtime"),
378
246
  {
379
247
  corejs: {
380
248
  version: 3,
381
249
  proposals: true
382
250
  },
383
- absoluteRuntime: (0, import_path2.dirname)(require.resolve("@babel/runtime-corejs3/package.json"))
251
+ absoluteRuntime: dirname(require3.resolve("@babel/runtime-corejs3/package.json"))
384
252
  }
385
253
  ],
386
254
  [
387
- require.resolve("@babel/plugin-proposal-decorators"),
255
+ require3.resolve("@babel/plugin-proposal-decorators"),
388
256
  {
389
257
  legacy: true
390
258
  }
391
259
  ],
392
- require.resolve("@babel/plugin-syntax-dynamic-import"),
393
- require.resolve("babel-plugin-lodash"),
394
- ifHmr(require.resolve("react-refresh/babel"))
260
+ require3.resolve("@babel/plugin-syntax-dynamic-import"),
261
+ require3.resolve("babel-plugin-lodash"),
262
+ ifHmr(require3.resolve("react-refresh/babel"))
395
263
  ])
396
264
  }
397
265
  },
@@ -426,7 +294,7 @@ var getWebpackConfig = async (env) => {
426
294
  issuer: [/\.(ts|tsx|js|jsx|md|mdx)$/],
427
295
  use: [
428
296
  {
429
- loader: require.resolve("@svgr/webpack"),
297
+ loader: require3.resolve("@svgr/webpack"),
430
298
  options: {
431
299
  svgoConfig: {
432
300
  plugins: [
@@ -443,7 +311,7 @@ var getWebpackConfig = async (env) => {
443
311
  }
444
312
  },
445
313
  {
446
- loader: require.resolve("url-loader"),
314
+ loader: require3.resolve("url-loader"),
447
315
  options: {
448
316
  name: "assets/[name]-[contenthash:16].[ext]",
449
317
  limit: imageInlineSizeLimit
@@ -463,13 +331,13 @@ var getWebpackConfig = async (env) => {
463
331
  {
464
332
  test: /\.ya?ml$/,
465
333
  use: [
466
- { loader: require.resolve("json-loader") },
467
- { loader: require.resolve("yaml-loader") }
334
+ { loader: require3.resolve("json-loader") },
335
+ { loader: require3.resolve("yaml-loader") }
468
336
  ]
469
337
  },
470
338
  {
471
339
  test: /\.html$/,
472
- loader: require.resolve("html-loader"),
340
+ loader: require3.resolve("html-loader"),
473
341
  options: {
474
342
  minimize: false
475
343
  }
@@ -484,7 +352,6 @@ var getWebpackConfig = async (env) => {
484
352
  },
485
353
  devtool: ifMin(false, "cheap-module-source-map"),
486
354
  devServer: {
487
- port,
488
355
  static: false,
489
356
  historyApiFallback: {
490
357
  disableDotRule: true
@@ -502,28 +369,28 @@ var getWebpackConfig = async (env) => {
502
369
  },
503
370
  optimization: {
504
371
  removeEmptyChunks: true,
505
- minimizer: ["...", new import_css_minimizer_webpack_plugin.default()]
372
+ minimizer: ["...", new CssMinimizerPlugin()]
506
373
  },
507
- plugins: (0, import_webpack_config_utils2.removeEmpty)([
508
- new import_webpack.ProgressPlugin(),
509
- new import_eslint_webpack_plugin.default({
374
+ plugins: removeEmpty([
375
+ new webpack.ProgressPlugin(),
376
+ new ESLintPlugin({
510
377
  extensions: moduleFileExtensions,
511
- eslintPath: require.resolve("eslint"),
378
+ eslintPath: require3.resolve("eslint"),
512
379
  cwd: paths.app,
513
380
  resolvePluginsRelativeTo: paths.app
514
381
  }),
515
- ifMin(new import_clean_webpack_plugin.CleanWebpackPlugin({})),
516
- ...appHtmlFiles.map((file) => new import_html_webpack_plugin2.default({
382
+ ifMin(new CleanWebpackPlugin({})),
383
+ ...appHtmlFiles.map((file) => new HtmlWebpackPlugin2({
517
384
  template: file,
518
- filename: (0, import_path2.basename)(file),
385
+ filename: basename(file),
519
386
  inject: false,
520
387
  minify: false
521
388
  })),
522
- new InterpolateHtmlPlugin_default(envVars.raw),
523
- new import_webpack.DefinePlugin(envVars.stringified),
524
- new import_fork_ts_checker_webpack_plugin.default({
389
+ new InterpolateHtmlPlugin(envVars.raw),
390
+ new webpack.DefinePlugin(envVars.stringified),
391
+ new ForkTsCheckerWebpackPlugin({
525
392
  typescript: {
526
- typescriptPath: require.resolve("typescript", {
393
+ typescriptPath: require3.resolve("typescript", {
527
394
  paths: [paths.appNodeModules]
528
395
  }),
529
396
  configFile: paths.appTsConfig,
@@ -536,8 +403,8 @@ var getWebpackConfig = async (env) => {
536
403
  }
537
404
  }
538
405
  }),
539
- ifHmr(new import_react_refresh_webpack_plugin.default()),
540
- ifMin(new import_mini_css_extract_plugin.default({
406
+ ifHmr(new ReactRefreshWebpackPlugin()),
407
+ ifMin(new MiniCssExtractPlugin({
541
408
  filename: "[name]-[contenthash:16].css",
542
409
  chunkFilename: "[name]-[contenthash:16].css",
543
410
  ignoreOrder: true,
@@ -545,31 +412,30 @@ var getWebpackConfig = async (env) => {
545
412
  "data-widget": `${process.env.ELEMENT_ATTRIBUTE_DATA_WIDGET}`
546
413
  }
547
414
  })),
548
- new import_webpack.IgnorePlugin({
415
+ new webpack.IgnorePlugin({
549
416
  resourceRegExp: /^\.\/locale$/,
550
417
  contextRegExp: /moment$/
551
418
  }),
552
- ifMin(new import_webpack.default.ids.HashedModuleIdsPlugin()),
553
- ifMin() && ifCore() ? new import_copy_webpack_plugin.default({
554
- patterns: [
555
- {
556
- from: "docs",
557
- to: "docs"
558
- }
559
- ]
419
+ ifMin(new webpack.ids.HashedModuleIdsPlugin()),
420
+ ifMin() && ifCore() ? new CopyPlugin({
421
+ patterns: ["README.md", "readme.html"]
560
422
  }) : void 0,
561
- ifMin() && ifAnalyze() ? new import_webpack_plugin.default({
423
+ ifMin() && ifAnalyze() ? new StatoscopeWebpackPlugin({
562
424
  name: ifCore("tamaro-core", "tamaro-customer-config"),
563
425
  saveReportTo: "reports/report.html",
564
426
  saveStatsTo: "reports/stats-[name]-[hash].json",
565
- additionalStats: import_glob.default.sync("reports/*.json"),
427
+ additionalStats: glob.sync("reports/*.json"),
566
428
  open: false
567
429
  }) : void 0
568
- ])
430
+ ]),
431
+ infrastructureLogging: {
432
+ stream: process.stdout,
433
+ appendOnly: false
434
+ }
569
435
  };
570
- return (0, import_webpack_config_utils2.removeEmpty)(config);
436
+ return removeEmpty(config);
571
437
  };
572
438
  var webpack_config_default = getWebpackConfig;
573
- module.exports = __toCommonJS(webpack_config_exports);
574
- // Annotate the CommonJS export names for ESM import in node:
575
- 0 && (module.exports = {});
439
+ export {
440
+ webpack_config_default as default
441
+ };