@backstage/cli 0.34.0-next.1 → 0.34.0-next.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # @backstage/cli
2
2
 
3
+ ## 0.34.0-next.2
4
+
5
+ ### Minor Changes
6
+
7
+ - 923ceb2: **BREAKING**: The new app build based on [Rspack](https://rspack.dev/) is now the default, and the `EXPERIMENTAL_RSPACK` flag has been removed. To revert to the old behavior, set the `LEGACY_WEBPACK_BUILD` environment flag and install the following optional dependencies:
8
+
9
+ ```json
10
+ {
11
+ "dependencies": {
12
+ "@module-federation/enhanced": "^0.9.0",
13
+ "@pmmmwh/react-refresh-webpack-plugin": "^0.5.7",
14
+ "esbuild-loader": "^4.0.0",
15
+ "eslint-webpack-plugin": "^4.2.0",
16
+ "fork-ts-checker-webpack-plugin": "^9.0.0",
17
+ "mini-css-extract-plugin": "^2.4.2",
18
+ "terser-webpack-plugin": "^5.1.3",
19
+ "webpack": "^5.96.0",
20
+ "webpack-dev-server": "^5.0.0"
21
+ }
22
+ }
23
+ ```
24
+
25
+ If you do encounter a blocking issue that forces you to use the old WebPack build, please [open an issue](https://github.com/backstage/backstage/issues) explaining the problem. The WebPack build will be removed in a future release.
26
+
27
+ - eda80c7: **BREAKING**: Removed support for `.icon.svg` imports, which have been deprecated since the 1.19 release.
28
+
29
+ ### Patch Changes
30
+
31
+ - 8b1bf6e: Deprecated new frontend system config setting `app.experimental.packages` to just `app.packages`. The old config will continue working for the time being, but may be removed in a future release.
32
+ - ead626f: The Node.js transform in `@backstage/cli/config/nodeTransformHooks.mjs` now supports the built-in type stripping in Node.js, which is enabled by default from v22.18.0.
33
+
3
34
  ## 0.34.0-next.1
4
35
 
5
36
  ### Minor Changes
@@ -65,44 +65,6 @@ declare module '*.yaml' {
65
65
  export default src;
66
66
  }
67
67
 
68
- /**
69
- * @deprecated support for .icon.svg extensions are being removed, inline the SVG elements in a MUI SvgIcon instead.
70
- * @example
71
- * ```tsx
72
- * import SvgIcon from '@material-ui/core/SvgIcon';
73
- *
74
- * const MyIcon = () => (
75
- * <SvgIcon>
76
- * <g>
77
- * <path d="..." />
78
- * </g>
79
- * </SvgIcon>
80
- * )
81
- * ```
82
- */
83
- declare module '*.icon.svg' {
84
- import { ComponentType } from 'react';
85
- import { SvgIconProps } from '@material-ui/core';
86
-
87
- /**
88
- * @deprecated support for .icon.svg extensions are being removed, inline the SVG elements in a MUI SvgIcon instead.
89
- * @example
90
- * ```tsx
91
- * import SvgIcon from '@material-ui/core/SvgIcon';
92
- *
93
- * const MyIcon = () => (
94
- * <SvgIcon>
95
- * <g>
96
- * <path d="..." />
97
- * </g>
98
- * </SvgIcon>
99
- * )
100
- * ```
101
- */
102
- const Icon: ComponentType<SvgIconProps>;
103
- export default Icon;
104
- }
105
-
106
68
  declare module '*.svg' {
107
69
  const src: string;
108
70
  export default src;
@@ -255,6 +255,18 @@ export async function load(url, context, nextLoad) {
255
255
  return nextLoad(url, { ...context, format });
256
256
  }
257
257
 
258
+ // If the Node.js version we're running supports TypeScript, i.e. type
259
+ // stripping, we hand over to the default loader. This is done for all cases
260
+ // except if we're loading a .ts file that's been resolved to CommonJS format.
261
+ // This is because these files aren't actually CommonJS in the Backstage build
262
+ // system, and need to be transformed to CommonJS.
263
+ if (
264
+ format === 'module-typescript' ||
265
+ (format === 'module-commonjs' && ext !== '.ts')
266
+ ) {
267
+ return nextLoad(url, { ...context, format });
268
+ }
269
+
258
270
  const transformed = await transformFile(fileURLToPath(url), {
259
271
  sourceMaps: 'inline',
260
272
  module: {
@@ -15,7 +15,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
15
15
  var chalk__default = /*#__PURE__*/_interopDefaultCompat(chalk);
16
16
 
17
17
  async function command(opts) {
18
- const rspack = process.env.EXPERIMENTAL_RSPACK ? require("@rspack/core") : void 0;
18
+ const webpack = process.env.LEGACY_WEBPACK_BUILD ? require("webpack") : void 0;
19
19
  const role$1 = await role.findRoleFromCommand(opts);
20
20
  if (role$1 === "frontend" || role$1 === "backend") {
21
21
  const configPaths = opts.config.map((arg) => {
@@ -29,7 +29,7 @@ async function command(opts) {
29
29
  targetDir: paths.paths.targetDir,
30
30
  configPaths,
31
31
  writeStats: Boolean(opts.stats),
32
- rspack
32
+ webpack
33
33
  });
34
34
  }
35
35
  return buildBackend.buildBackend({
@@ -50,7 +50,7 @@ async function command(opts) {
50
50
  configPaths: [],
51
51
  writeStats: Boolean(opts.stats),
52
52
  isModuleFederationRemote: true,
53
- rspack
53
+ webpack
54
54
  });
55
55
  }
56
56
  const roleInfo = cliNode.PackageRoles.getRoleInfo(role$1);
@@ -3,20 +3,17 @@
3
3
  var fs = require('fs-extra');
4
4
  var path = require('path');
5
5
  require('yn');
6
- require('webpack');
6
+ require('@rspack/core');
7
7
  require('react-dev-utils/FileSizeReporter');
8
8
  require('react-dev-utils/formatWebpackMessages');
9
- require('eslint-webpack-plugin');
10
- require('fork-ts-checker-webpack-plugin');
9
+ require('eslint-rspack-plugin');
10
+ require('ts-checker-rspack-plugin');
11
11
  require('html-webpack-plugin');
12
- require('@module-federation/enhanced/webpack');
13
12
  require('react-dev-utils/ModuleScopePlugin');
14
- require('@pmmmwh/react-refresh-webpack-plugin');
13
+ require('@module-federation/enhanced/rspack');
15
14
  var paths = require('../../../../../lib/paths.cjs.js');
16
- require('../../../lib/bundler/optimization.cjs.js');
17
15
  require('lodash/pickBy');
18
16
  require('../../../../../lib/run.cjs.js');
19
- require('mini-css-extract-plugin');
20
17
  require('../../../../../lib/version.cjs.js');
21
18
  var hasReactDomClient = require('../../../lib/bundler/hasReactDomClient.cjs.js');
22
19
  require('@manypkg/get-packages');
@@ -16,8 +16,7 @@ var chalk__default = /*#__PURE__*/_interopDefaultCompat(chalk);
16
16
 
17
17
  async function command(opts, cmd) {
18
18
  let packages = await cliNode.PackageGraph.listTargetPackages();
19
- const shouldUseRspack = Boolean(process.env.EXPERIMENTAL_RSPACK);
20
- const rspack = shouldUseRspack ? require("@rspack/core") : void 0;
19
+ const webpack = process.env.LEGACY_WEBPACK_BUILD ? require("webpack") : void 0;
21
20
  if (opts.since) {
22
21
  const graph = cliNode.PackageGraph.fromPackages(packages);
23
22
  const changedPackages = await graph.listChangedPackages({
@@ -86,7 +85,7 @@ async function command(opts, cmd) {
86
85
  targetDir: pkg.dir,
87
86
  configPaths: buildOptions.config ?? [],
88
87
  writeStats: Boolean(buildOptions.stats),
89
- rspack
88
+ webpack
90
89
  });
91
90
  }
92
91
  });
@@ -6,20 +6,17 @@ var bundle = require('./bundler/bundle.cjs.js');
6
6
  var moduleFederation = require('./bundler/moduleFederation.cjs.js');
7
7
  require('chalk');
8
8
  require('react-dev-utils/openBrowser');
9
- require('webpack');
10
- require('webpack-dev-server');
9
+ require('@rspack/core');
10
+ require('@rspack/dev-server');
11
11
  require('../../../lib/paths.cjs.js');
12
12
  var config = require('../../config/lib/config.cjs.js');
13
- require('eslint-webpack-plugin');
14
- require('fork-ts-checker-webpack-plugin');
13
+ require('eslint-rspack-plugin');
14
+ require('ts-checker-rspack-plugin');
15
15
  require('html-webpack-plugin');
16
- require('@module-federation/enhanced/webpack');
17
16
  require('react-dev-utils/ModuleScopePlugin');
18
- require('@pmmmwh/react-refresh-webpack-plugin');
19
- require('./bundler/optimization.cjs.js');
17
+ require('@module-federation/enhanced/rspack');
20
18
  require('lodash/pickBy');
21
19
  require('../../../lib/run.cjs.js');
22
- require('mini-css-extract-plugin');
23
20
  require('../../../lib/version.cjs.js');
24
21
  require('yn');
25
22
  require('@manypkg/get-packages');
@@ -31,7 +28,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
31
28
  var fs__default = /*#__PURE__*/_interopDefaultCompat(fs);
32
29
 
33
30
  async function buildFrontend(options) {
34
- const { targetDir, writeStats, configPaths, rspack } = options;
31
+ const { targetDir, writeStats, configPaths, webpack } = options;
35
32
  const packageJson = await fs__default.default.readJson(
36
33
  path.resolve(targetDir, "package.json")
37
34
  );
@@ -49,7 +46,7 @@ async function buildFrontend(options) {
49
46
  args: configPaths,
50
47
  fromPackage: packageJson.name
51
48
  }),
52
- rspack
49
+ webpack
53
50
  });
54
51
  }
55
52
 
@@ -7,14 +7,12 @@ var commonjs = require('@rollup/plugin-commonjs');
7
7
  var resolve = require('@rollup/plugin-node-resolve');
8
8
  var postcss = require('rollup-plugin-postcss');
9
9
  var esbuild = require('rollup-plugin-esbuild');
10
- var svgr = require('@svgr/rollup');
11
10
  var dts = require('rollup-plugin-dts');
12
11
  var json = require('@rollup/plugin-json');
13
12
  var yaml = require('@rollup/plugin-yaml');
14
13
  var plugins = require('./plugins.cjs.js');
15
14
  var types = require('./types.cjs.js');
16
15
  var paths = require('../../../../lib/paths.cjs.js');
17
- var svgrTemplate = require('../../../../lib/svgrTemplate.cjs.js');
18
16
  var entryPoints = require('../../../../lib/entryPoints.cjs.js');
19
17
 
20
18
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
@@ -25,7 +23,6 @@ var commonjs__default = /*#__PURE__*/_interopDefaultCompat(commonjs);
25
23
  var resolve__default = /*#__PURE__*/_interopDefaultCompat(resolve);
26
24
  var postcss__default = /*#__PURE__*/_interopDefaultCompat(postcss);
27
25
  var esbuild__default = /*#__PURE__*/_interopDefaultCompat(esbuild);
28
- var svgr__default = /*#__PURE__*/_interopDefaultCompat(svgr);
29
26
  var dts__default = /*#__PURE__*/_interopDefaultCompat(dts);
30
27
  var json__default = /*#__PURE__*/_interopDefaultCompat(json);
31
28
  var yaml__default = /*#__PURE__*/_interopDefaultCompat(yaml);
@@ -201,10 +198,6 @@ async function makeRollupConfigs(options) {
201
198
  }),
202
199
  json__default.default(),
203
200
  yaml__default.default(),
204
- svgr__default.default({
205
- include: /\.icon\.svg$/,
206
- template: svgrTemplate.svgrTemplate
207
- }),
208
201
  esbuild__default.default({
209
202
  target: "ES2022",
210
203
  minify: options.minify
@@ -3,7 +3,7 @@
3
3
  var yn = require('yn');
4
4
  var fs = require('fs-extra');
5
5
  var path = require('path');
6
- var webpack = require('webpack');
6
+ var core = require('@rspack/core');
7
7
  var FileSizeReporter = require('react-dev-utils/FileSizeReporter');
8
8
  var formatWebpackMessages = require('react-dev-utils/formatWebpackMessages');
9
9
  var config = require('./config.cjs.js');
@@ -15,7 +15,6 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
15
15
 
16
16
  var yn__default = /*#__PURE__*/_interopDefaultCompat(yn);
17
17
  var fs__default = /*#__PURE__*/_interopDefaultCompat(fs);
18
- var webpack__default = /*#__PURE__*/_interopDefaultCompat(webpack);
19
18
  var formatWebpackMessages__default = /*#__PURE__*/_interopDefaultCompat(formatWebpackMessages);
20
19
  var chalk__default = /*#__PURE__*/_interopDefaultCompat(chalk);
21
20
 
@@ -26,7 +25,7 @@ function applyContextToError(error, moduleName) {
26
25
  ${error}`;
27
26
  }
28
27
  async function buildBundle(options) {
29
- const { statsJsonEnabled, schema: configSchema, rspack } = options;
28
+ const { statsJsonEnabled, schema: configSchema, webpack } = options;
30
29
  const paths$1 = paths.resolveBundlingPaths(options);
31
30
  const publicPaths = await paths.resolveOptionalBundlingPaths({
32
31
  targetDir: options.targetDir,
@@ -91,12 +90,10 @@ async function buildBundle(options) {
91
90
  { spaces: 2 }
92
91
  );
93
92
  }
94
- if (rspack) {
95
- console.log(
96
- chalk__default.default.yellow(`\u26A0\uFE0F WARNING: Using experimental RSPack bundler.`)
97
- );
93
+ if (webpack) {
94
+ console.log(chalk__default.default.yellow(`\u26A0\uFE0F WARNING: Using legacy WebPack bundler`));
98
95
  }
99
- const { stats } = await build(configs, isCi, rspack);
96
+ const { stats } = await build(configs, isCi, webpack);
100
97
  if (!stats) {
101
98
  throw new Error("No stats returned");
102
99
  }
@@ -124,29 +121,27 @@ async function buildBundle(options) {
124
121
  );
125
122
  }
126
123
  }
127
- async function build(configs, isCi, rspack) {
128
- const bundler = rspack ?? webpack__default.default;
129
- const stats = await new Promise(
130
- (resolve, reject) => {
131
- bundler(configs, (err, buildStats) => {
132
- if (err) {
133
- if (err.message) {
134
- const { errors: errors2 } = formatWebpackMessages__default.default({
135
- errors: [err.message],
136
- warnings: new Array(),
137
- _showErrors: true,
138
- _showWarnings: true
139
- });
140
- throw new Error(errors2[0]);
141
- } else {
142
- reject(err);
143
- }
124
+ async function build(configs, isCi, webpack) {
125
+ const bundler = webpack ?? core.rspack;
126
+ const stats = await new Promise((resolve, reject) => {
127
+ bundler(configs, (err, buildStats) => {
128
+ if (err) {
129
+ if (err.message) {
130
+ const { errors: errors2 } = formatWebpackMessages__default.default({
131
+ errors: [err.message],
132
+ warnings: new Array(),
133
+ _showErrors: true,
134
+ _showWarnings: true
135
+ });
136
+ throw new Error(errors2[0]);
144
137
  } else {
145
- resolve(buildStats);
138
+ reject(err);
146
139
  }
147
- });
148
- }
149
- );
140
+ } else {
141
+ resolve(buildStats);
142
+ }
143
+ });
144
+ });
150
145
  if (!stats) {
151
146
  throw new Error("Failed to compile: No stats provided");
152
147
  }
@@ -1,13 +1,12 @@
1
1
  'use strict';
2
2
 
3
3
  var path = require('path');
4
- var webpack$1 = require('webpack');
5
- var ESLintPlugin = require('eslint-webpack-plugin');
6
- var ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
4
+ var core = require('@rspack/core');
5
+ var ESLintRspackPlugin = require('eslint-rspack-plugin');
6
+ var tsCheckerRspackPlugin = require('ts-checker-rspack-plugin');
7
7
  var HtmlWebpackPlugin = require('html-webpack-plugin');
8
- var webpack = require('@module-federation/enhanced/webpack');
9
8
  var ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
10
- var ReactRefreshPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
9
+ var rspack = require('@module-federation/enhanced/rspack');
11
10
  var paths = require('../../../../lib/paths.cjs.js');
12
11
  var fs = require('fs-extra');
13
12
  var optimization = require('./optimization.cjs.js');
@@ -22,12 +21,9 @@ var ConfigInjectingHtmlWebpackPlugin = require('./ConfigInjectingHtmlWebpackPlug
22
21
 
23
22
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
24
23
 
25
- var webpack__default = /*#__PURE__*/_interopDefaultCompat(webpack$1);
26
- var ESLintPlugin__default = /*#__PURE__*/_interopDefaultCompat(ESLintPlugin);
27
- var ForkTsCheckerWebpackPlugin__default = /*#__PURE__*/_interopDefaultCompat(ForkTsCheckerWebpackPlugin);
24
+ var ESLintRspackPlugin__default = /*#__PURE__*/_interopDefaultCompat(ESLintRspackPlugin);
28
25
  var HtmlWebpackPlugin__default = /*#__PURE__*/_interopDefaultCompat(HtmlWebpackPlugin);
29
26
  var ModuleScopePlugin__default = /*#__PURE__*/_interopDefaultCompat(ModuleScopePlugin);
30
- var ReactRefreshPlugin__default = /*#__PURE__*/_interopDefaultCompat(ReactRefreshPlugin);
31
27
  var fs__default = /*#__PURE__*/_interopDefaultCompat(fs);
32
28
  var pickBy__default = /*#__PURE__*/_interopDefaultCompat(pickBy);
33
29
  var yn__default = /*#__PURE__*/_interopDefaultCompat(yn);
@@ -83,7 +79,7 @@ async function createConfig(paths, options) {
83
79
  frontendConfig,
84
80
  moduleFederation,
85
81
  publicSubPath = "",
86
- rspack
82
+ webpack
87
83
  } = options;
88
84
  const { plugins, loaders } = transforms.transforms(options);
89
85
  const validBaseUrl = resolveBaseUrl(frontendConfig, moduleFederation);
@@ -103,25 +99,30 @@ async function createConfig(paths, options) {
103
99
  sockPort: port
104
100
  }
105
101
  };
106
- if (rspack) {
102
+ if (webpack) {
103
+ const ReactRefreshPlugin = require("@pmmmwh/react-refresh-webpack-plugin");
104
+ plugins.push(new ReactRefreshPlugin(refreshOptions));
105
+ } else {
107
106
  const RspackReactRefreshPlugin = require("@rspack/plugin-react-refresh");
108
107
  plugins.push(new RspackReactRefreshPlugin(refreshOptions));
109
- } else {
110
- plugins.push(new ReactRefreshPlugin__default.default(refreshOptions));
111
108
  }
112
109
  }
113
110
  if (checksEnabled) {
111
+ const TsCheckerPlugin = webpack ? require("fork-ts-checker-webpack-plugin") : tsCheckerRspackPlugin.TsCheckerRspackPlugin;
112
+ const ESLintPlugin = webpack ? require("eslint-webpack-plugin") : ESLintRspackPlugin__default.default;
114
113
  plugins.push(
115
- new ForkTsCheckerWebpackPlugin__default.default({
116
- typescript: { configFile: paths.targetTsConfig, memoryLimit: 4096 }
114
+ new TsCheckerPlugin({
115
+ typescript: { configFile: paths.targetTsConfig, memoryLimit: 8192 }
117
116
  }),
118
- new ESLintPlugin__default.default({
117
+ new ESLintPlugin({
118
+ cache: false,
119
+ // Cache seems broken
119
120
  context: paths.targetPath,
120
121
  files: ["**/*.(ts|tsx|mts|cts|js|jsx|mjs|cjs)"]
121
122
  })
122
123
  );
123
124
  }
124
- const bundler = rspack ? rspack : webpack__default.default;
125
+ const bundler = webpack ? webpack : core.rspack;
125
126
  plugins.push(
126
127
  new bundler.ProvidePlugin({
127
128
  process: require.resolve("process/browser"),
@@ -139,15 +140,15 @@ async function createConfig(paths, options) {
139
140
  config: frontendConfig
140
141
  }
141
142
  };
142
- if (rspack) {
143
+ if (webpack) {
144
+ plugins.push(new HtmlWebpackPlugin__default.default(templateOptions));
145
+ } else {
143
146
  plugins.push(
144
147
  new ConfigInjectingHtmlWebpackPlugin.ConfigInjectingHtmlWebpackPlugin(
145
148
  templateOptions,
146
149
  options.getFrontendAppConfigs
147
150
  )
148
151
  );
149
- } else {
150
- plugins.push(new HtmlWebpackPlugin__default.default(templateOptions));
151
152
  }
152
153
  plugins.push(
153
154
  new HtmlWebpackPlugin__default.default({
@@ -165,7 +166,7 @@ async function createConfig(paths, options) {
165
166
  }
166
167
  if (options.moduleFederation) {
167
168
  const isRemote = options.moduleFederation?.mode === "remote";
168
- const AdaptedModuleFederationPlugin = rspack ? require("@module-federation/enhanced/rspack").ModuleFederationPlugin : webpack.ModuleFederationPlugin;
169
+ const AdaptedModuleFederationPlugin = webpack ? require("@module-federation/enhanced/webpack").ModuleFederationPlugin : rspack.ModuleFederationPlugin;
169
170
  const exposes = options.moduleFederation?.exposes ? Object.fromEntries(
170
171
  Object.entries(options.moduleFederation?.exposes).map(([k, v]) => [
171
172
  k,
@@ -233,15 +234,26 @@ async function createConfig(paths, options) {
233
234
  }
234
235
  const buildInfo = await readBuildInfo();
235
236
  plugins.push(
236
- new bundler.DefinePlugin({
237
+ webpack ? new webpack.DefinePlugin({
237
238
  "process.env.BUILD_INFO": JSON.stringify(buildInfo),
238
- "process.env.APP_CONFIG": rspack ? JSON.stringify([]) : bundler.DefinePlugin.runtimeValue(
239
+ "process.env.APP_CONFIG": webpack.DefinePlugin.runtimeValue(
239
240
  () => JSON.stringify(options.getFrontendAppConfigs()),
240
241
  true
241
242
  ),
242
243
  // This allows for conditional imports of react-dom/client, since there's no way
243
244
  // to check for presence of it in source code without module resolution errors.
244
- "process.env.HAS_REACT_DOM_CLIENT": JSON.stringify(hasReactDomClient.hasReactDomClient())
245
+ "process.env.HAS_REACT_DOM_CLIENT": JSON.stringify(
246
+ hasReactDomClient.hasReactDomClient()
247
+ )
248
+ }) : new bundler.DefinePlugin({
249
+ "process.env.BUILD_INFO": JSON.stringify(buildInfo),
250
+ "process.env.APP_CONFIG": JSON.stringify([]),
251
+ // Inject via index.html instead
252
+ // This allows for conditional imports of react-dom/client, since there's no way
253
+ // to check for presence of it in source code without module resolution errors.
254
+ "process.env.HAS_REACT_DOM_CLIENT": JSON.stringify(
255
+ hasReactDomClient.hasReactDomClient()
256
+ )
245
257
  })
246
258
  );
247
259
  if (options.linkedWorkspace) {
@@ -252,7 +264,7 @@ async function createConfig(paths, options) {
252
264
  )
253
265
  );
254
266
  }
255
- const reactRefreshFiles = rspack ? [] : [
267
+ const reactRefreshFiles = webpack ? [
256
268
  require.resolve(
257
269
  "@pmmmwh/react-refresh-webpack-plugin/lib/runtime/RefreshUtils.js"
258
270
  ),
@@ -260,7 +272,7 @@ async function createConfig(paths, options) {
260
272
  "@pmmmwh/react-refresh-webpack-plugin/overlay/index.js"
261
273
  ),
262
274
  require.resolve("react-refresh")
263
- ];
275
+ ] : [];
264
276
  const mode = isDev ? "development" : "production";
265
277
  const optimization$1 = optimization.optimization(options);
266
278
  return {
@@ -304,7 +316,7 @@ async function createConfig(paths, options) {
304
316
  util: require.resolve("util/")
305
317
  },
306
318
  // FIXME: see also https://github.com/web-infra-dev/rspack/issues/3408
307
- ...!rspack && {
319
+ ...webpack && {
308
320
  plugins: [
309
321
  new ModuleScopePlugin__default.default(
310
322
  [paths.targetSrc, paths.targetDev],
@@ -331,7 +343,7 @@ async function createConfig(paths, options) {
331
343
  },
332
344
  experiments: {
333
345
  lazyCompilation: yn__default.default(process.env.EXPERIMENTAL_LAZY_COMPILATION),
334
- ...rspack && {
346
+ ...!webpack && {
335
347
  // We're still using `style-loader` for custom `insert` option
336
348
  css: false
337
349
  }
@@ -1,9 +1,10 @@
1
1
  'use strict';
2
2
 
3
- const { EsbuildPlugin } = require("esbuild-loader");
3
+ var core = require('@rspack/core');
4
+
4
5
  const optimization = (options) => {
5
- const { isDev, rspack } = options;
6
- const MinifyPlugin = rspack ? rspack.SwcJsMinimizerRspackPlugin : EsbuildPlugin;
6
+ const { isDev, webpack } = options;
7
+ const MinifyPlugin = webpack ? require("esbuild-loader").EsbuildPlugin : core.SwcJsMinimizerRspackPlugin;
7
8
  return {
8
9
  minimize: !isDev,
9
10
  minimizer: [
@@ -18,7 +19,7 @@ const optimization = (options) => {
18
19
  format: void 0,
19
20
  include: "remoteEntry.js"
20
21
  }),
21
- rspack && new rspack.LightningCssMinimizerRspackPlugin()
22
+ webpack ? void 0 : new core.LightningCssMinimizerRspackPlugin()
22
23
  ],
23
24
  runtimeChunk: "single",
24
25
  splitChunks: {
@@ -44,7 +45,7 @@ const optimization = (options) => {
44
45
  priority: 10,
45
46
  minSize: 1e5,
46
47
  minChunks: 1,
47
- ...!rspack && {
48
+ ...webpack && {
48
49
  maxAsyncRequests: Infinity,
49
50
  maxInitialRequests: Infinity
50
51
  }
@@ -15,27 +15,22 @@ var PQueue__default = /*#__PURE__*/_interopDefaultCompat(PQueue);
15
15
 
16
16
  const DETECTED_MODULES_MODULE_NAME = "__backstage-autodetected-plugins__";
17
17
  function readPackageDetectionConfig(config$1) {
18
- const packages = config$1.getOptional("app.experimental.packages");
18
+ const packages = config$1.getOptional("app.packages") ?? config$1.getOptional("app.experimental.packages");
19
19
  if (packages === void 0 || packages === null) {
20
20
  return void 0;
21
21
  }
22
22
  if (typeof packages === "string") {
23
23
  if (packages !== "all") {
24
24
  throw new Error(
25
- `Invalid app.experimental.packages mode, got '${packages}', expected 'all'`
25
+ `Invalid app.packages mode, got '${packages}', expected 'all'`
26
26
  );
27
27
  }
28
28
  return {};
29
29
  }
30
30
  if (typeof packages !== "object" || Array.isArray(packages)) {
31
- throw new Error(
32
- "Invalid config at 'app.experimental.packages', expected object"
33
- );
31
+ throw new Error("Invalid config at 'app.packages', expected object");
34
32
  }
35
- const packagesConfig = new config.ConfigReader(
36
- packages,
37
- "app.experimental.packages"
38
- );
33
+ const packagesConfig = new config.ConfigReader(packages, "app.packages");
39
34
  return {
40
35
  include: packagesConfig.getOptionalStringArray("include"),
41
36
  exclude: packagesConfig.getOptionalStringArray("exclude")
@@ -4,8 +4,8 @@ var chalk = require('chalk');
4
4
  var fs = require('fs-extra');
5
5
  var path = require('path');
6
6
  var openBrowser = require('react-dev-utils/openBrowser');
7
- var webpack = require('webpack');
8
- var WebpackDevServer = require('webpack-dev-server');
7
+ var core = require('@rspack/core');
8
+ var devServer = require('@rspack/dev-server');
9
9
  var paths$1 = require('../../../../lib/paths.cjs.js');
10
10
  var config = require('../../../config/lib/config.cjs.js');
11
11
  var config$1 = require('./config.cjs.js');
@@ -17,8 +17,6 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
17
17
  var chalk__default = /*#__PURE__*/_interopDefaultCompat(chalk);
18
18
  var fs__default = /*#__PURE__*/_interopDefaultCompat(fs);
19
19
  var openBrowser__default = /*#__PURE__*/_interopDefaultCompat(openBrowser);
20
- var webpack__default = /*#__PURE__*/_interopDefaultCompat(webpack);
21
- var WebpackDevServer__default = /*#__PURE__*/_interopDefaultCompat(WebpackDevServer);
22
20
 
23
21
  async function serveBundle(options) {
24
22
  const paths$2 = paths.resolveBundlingPaths(options);
@@ -38,14 +36,14 @@ DEPRECATION WARNING: React Router Beta is deprecated and support for it will be
38
36
  const { name } = await fs__default.default.readJson(
39
37
  path.resolve(options.targetDir ?? paths$1.paths.targetDir, "package.json")
40
38
  );
41
- let webpackServer = void 0;
39
+ let devServer$1 = void 0;
42
40
  let latestFrontendAppConfigs = [];
43
41
  const triggerReload = () => {
44
- if (webpackServer) {
45
- webpackServer.invalidate();
46
- if (process.env.EXPERIMENTAL_RSPACK) {
47
- webpackServer.sendMessage(
48
- webpackServer.webSocketServer?.clients ?? [],
42
+ if (devServer$1) {
43
+ devServer$1.invalidate();
44
+ if (!process.env.LEGACY_WEBPACK_BUILD) {
45
+ devServer$1.sendMessage(
46
+ devServer$1.webSocketServer?.clients ?? [],
49
47
  "static-changed"
50
48
  );
51
49
  }
@@ -92,14 +90,14 @@ DEPRECATION WARNING: React Router Beta is deprecated and support for it will be
92
90
  triggerReload();
93
91
  }
94
92
  });
95
- const rspack = process.env.EXPERIMENTAL_RSPACK ? require("@rspack/core") : void 0;
93
+ const webpack = process.env.LEGACY_WEBPACK_BUILD ? require("webpack") : void 0;
96
94
  const commonConfigOptions = {
97
95
  ...options,
98
96
  checksEnabled: options.checksEnabled,
99
97
  isDev: true,
100
98
  baseUrl: url,
101
99
  frontendConfig,
102
- rspack,
100
+ webpack,
103
101
  getFrontendAppConfigs: () => {
104
102
  return latestFrontendAppConfigs;
105
103
  }
@@ -109,12 +107,10 @@ DEPRECATION WARNING: React Router Beta is deprecated and support for it will be
109
107
  additionalEntryPoints: detectedModulesEntryPoint,
110
108
  moduleFederation: options.moduleFederation
111
109
  });
112
- const bundler = rspack ?? webpack__default.default;
113
- const DevServer = rspack ? require("@rspack/dev-server").RspackDevServer : WebpackDevServer__default.default;
114
- if (rspack) {
115
- console.log(
116
- chalk__default.default.yellow(`\u26A0\uFE0F WARNING: Using experimental RSPack dev server.`)
117
- );
110
+ const bundler = webpack ?? core.rspack;
111
+ const DevServer = webpack ? require("webpack-dev-server") : devServer.RspackDevServer;
112
+ if (webpack) {
113
+ console.log(chalk__default.default.yellow(`\u26A0\uFE0F WARNING: Using legacy WebPack dev server.`));
118
114
  }
119
115
  const publicPaths = await paths.resolveOptionalBundlingPaths({
120
116
  entry: "src/index-public-experimental",
@@ -128,7 +124,7 @@ DEPRECATION WARNING: React Router Beta is deprecated and support for it will be
128
124
  );
129
125
  }
130
126
  const compiler = publicPaths ? bundler([config$2, await config$1.createConfig(publicPaths, commonConfigOptions)]) : bundler(config$2);
131
- webpackServer = new DevServer(
127
+ devServer$1 = new DevServer(
132
128
  {
133
129
  hot: !process.env.CI,
134
130
  devMiddleware: {
@@ -172,8 +168,8 @@ DEPRECATION WARNING: React Router Beta is deprecated and support for it will be
172
168
  compiler
173
169
  );
174
170
  await new Promise(async (resolve, reject) => {
175
- if (webpackServer) {
176
- webpackServer.startCallback((err) => {
171
+ if (devServer$1) {
172
+ devServer$1.startCallback((err) => {
177
173
  if (err) {
178
174
  reject(err);
179
175
  return;
@@ -190,7 +186,7 @@ DEPRECATION WARNING: React Router Beta is deprecated and support for it will be
190
186
  const waitForExit = async () => {
191
187
  for (const signal of ["SIGINT", "SIGTERM"]) {
192
188
  process.on(signal, () => {
193
- webpackServer?.stop();
189
+ devServer$1?.stop();
194
190
  process.exit();
195
191
  });
196
192
  }
@@ -1,15 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var MiniCssExtractPlugin = require('mini-css-extract-plugin');
4
- var svgrTemplate = require('../../../../lib/svgrTemplate.cjs.js');
5
-
6
- function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
7
-
8
- var MiniCssExtractPlugin__default = /*#__PURE__*/_interopDefaultCompat(MiniCssExtractPlugin);
3
+ var core = require('@rspack/core');
9
4
 
10
5
  const transforms = (options) => {
11
- const { isDev, isBackend, rspack } = options;
12
- const CssExtractRspackPlugin = rspack ? rspack.CssExtractRspackPlugin : MiniCssExtractPlugin__default.default;
6
+ const { isDev, isBackend, webpack } = options;
7
+ const CssExtractPlugin = webpack ? require("mini-css-extract-plugin") : core.CssExtractRspackPlugin;
13
8
  function insertBeforeJssStyles(element) {
14
9
  const head = document.head;
15
10
  const firstJssNode = head.querySelector("style[data-jss]");
@@ -25,7 +20,7 @@ const transforms = (options) => {
25
20
  exclude: /node_modules/,
26
21
  use: [
27
22
  {
28
- loader: rspack ? "builtin:swc-loader" : require.resolve("swc-loader"),
23
+ loader: webpack ? require.resolve("swc-loader") : "builtin:swc-loader",
29
24
  options: {
30
25
  jsc: {
31
26
  target: "es2022",
@@ -51,7 +46,7 @@ const transforms = (options) => {
51
46
  exclude: /node_modules/,
52
47
  use: [
53
48
  {
54
- loader: rspack ? "builtin:swc-loader" : require.resolve("swc-loader"),
49
+ loader: webpack ? require.resolve("swc-loader") : "builtin:swc-loader",
55
50
  options: {
56
51
  jsc: {
57
52
  target: "es2022",
@@ -78,29 +73,6 @@ const transforms = (options) => {
78
73
  fullySpecified: false
79
74
  }
80
75
  },
81
- {
82
- test: [/\.icon\.svg$/],
83
- use: [
84
- {
85
- loader: rspack ? "builtin:swc-loader" : require.resolve("swc-loader"),
86
- options: {
87
- jsc: {
88
- target: "es2022",
89
- externalHelpers: !isBackend,
90
- parser: {
91
- syntax: "ecmascript",
92
- jsx: !isBackend,
93
- dynamicImport: true
94
- }
95
- }
96
- }
97
- },
98
- {
99
- loader: require.resolve("@svgr/webpack"),
100
- options: { babel: false, template: svgrTemplate.svgrTemplate }
101
- }
102
- ]
103
- },
104
76
  {
105
77
  test: [
106
78
  /\.bmp$/,
@@ -145,7 +117,7 @@ const transforms = (options) => {
145
117
  options: {
146
118
  insert: insertBeforeJssStyles
147
119
  }
148
- } : CssExtractRspackPlugin.loader,
120
+ } : CssExtractPlugin.loader,
149
121
  {
150
122
  loader: require.resolve("css-loader"),
151
123
  options: {
@@ -158,7 +130,7 @@ const transforms = (options) => {
158
130
  const plugins = new Array();
159
131
  if (!isDev) {
160
132
  plugins.push(
161
- new CssExtractRspackPlugin({
133
+ new CssExtractPlugin({
162
134
  filename: "static/[name].[contenthash:8].css",
163
135
  chunkFilename: "static/[name].[id].[contenthash:8].css",
164
136
  insert: insertBeforeJssStyles
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.34.0-next.1";
3
+ var version = "0.34.0-next.2";
4
4
  var dependencies = {
5
5
  "@backstage/catalog-model": "workspace:^",
6
6
  "@backstage/cli-common": "workspace:^",
@@ -18,20 +18,16 @@ var dependencies = {
18
18
  "@octokit/graphql-schema": "^13.7.0",
19
19
  "@octokit/oauth-app": "^4.2.0",
20
20
  "@octokit/request": "^8.0.0",
21
- "@pmmmwh/react-refresh-webpack-plugin": "^0.5.7",
22
21
  "@rollup/plugin-commonjs": "^26.0.0",
23
22
  "@rollup/plugin-json": "^6.0.0",
24
23
  "@rollup/plugin-node-resolve": "^15.0.0",
25
24
  "@rollup/plugin-yaml": "^4.0.0",
25
+ "@rspack/core": "^1.4.11",
26
+ "@rspack/dev-server": "^1.1.4",
27
+ "@rspack/plugin-react-refresh": "^1.4.3",
26
28
  "@spotify/eslint-config-base": "^15.0.0",
27
29
  "@spotify/eslint-config-react": "^15.0.0",
28
30
  "@spotify/eslint-config-typescript": "^15.0.0",
29
- "@sucrase/webpack-loader": "^2.0.0",
30
- "@svgr/core": "6.5.x",
31
- "@svgr/plugin-jsx": "6.5.x",
32
- "@svgr/plugin-svgo": "6.5.x",
33
- "@svgr/rollup": "6.5.x",
34
- "@svgr/webpack": "6.5.x",
35
31
  "@swc/core": "^1.3.46",
36
32
  "@swc/helpers": "^0.5.0",
37
33
  "@swc/jest": "^0.2.22",
@@ -51,7 +47,6 @@ var dependencies = {
51
47
  "css-loader": "^6.5.1",
52
48
  "ctrlc-windows": "^2.1.0",
53
49
  esbuild: "^0.25.0",
54
- "esbuild-loader": "^4.0.0",
55
50
  eslint: "^8.6.0",
56
51
  "eslint-config-prettier": "^9.0.0",
57
52
  "eslint-formatter-friendly": "^7.0.0",
@@ -62,9 +57,8 @@ var dependencies = {
62
57
  "eslint-plugin-react": "^7.37.2",
63
58
  "eslint-plugin-react-hooks": "^5.0.0",
64
59
  "eslint-plugin-unused-imports": "^4.1.4",
65
- "eslint-webpack-plugin": "^4.2.0",
60
+ "eslint-rspack-plugin": "^4.2.1",
66
61
  express: "^4.17.1",
67
- "fork-ts-checker-webpack-plugin": "^9.0.0",
68
62
  "fs-extra": "^11.2.0",
69
63
  "git-url-parse": "^15.0.0",
70
64
  glob: "^7.1.7",
@@ -80,7 +74,6 @@ var dependencies = {
80
74
  "jest-runtime": "^29.0.2",
81
75
  "json-schema": "^0.4.0",
82
76
  lodash: "^4.17.21",
83
- "mini-css-extract-plugin": "^2.4.2",
84
77
  minimatch: "^9.0.0",
85
78
  "node-stdlib-browser": "^1.3.1",
86
79
  "npm-packlist": "^5.0.0",
@@ -104,12 +97,10 @@ var dependencies = {
104
97
  sucrase: "^3.20.2",
105
98
  "swc-loader": "^0.2.3",
106
99
  tar: "^6.1.12",
107
- "terser-webpack-plugin": "^5.1.3",
100
+ "ts-checker-rspack-plugin": "^1.1.5",
108
101
  "ts-morph": "^24.0.0",
109
102
  undici: "^7.2.3",
110
103
  util: "^0.12.3",
111
- webpack: "^5.94.0",
112
- "webpack-dev-server": "^5.0.0",
113
104
  yaml: "^2.0.0",
114
105
  yargs: "^16.2.0",
115
106
  "yml-loader": "^2.1.0",
@@ -134,9 +125,7 @@ var devDependencies = {
134
125
  "@backstage/plugin-scaffolder-node-test-utils": "workspace:^",
135
126
  "@backstage/test-utils": "workspace:^",
136
127
  "@backstage/theme": "workspace:^",
137
- "@rspack/core": "^1.3.9",
138
- "@rspack/dev-server": "^1.1.1",
139
- "@rspack/plugin-react-refresh": "^1.4.2",
128
+ "@pmmmwh/react-refresh-webpack-plugin": "^0.5.7",
140
129
  "@types/cross-spawn": "^6.0.2",
141
130
  "@types/ejs": "^3.1.3",
142
131
  "@types/express": "^4.17.6",
@@ -154,8 +143,15 @@ var devDependencies = {
154
143
  "@types/webpack-sources": "^3.2.3",
155
144
  "@types/yarnpkg__lockfile": "^1.1.4",
156
145
  del: "^8.0.0",
146
+ "esbuild-loader": "^4.0.0",
147
+ "eslint-webpack-plugin": "^4.2.0",
148
+ "fork-ts-checker-webpack-plugin": "^9.0.0",
149
+ "mini-css-extract-plugin": "^2.4.2",
157
150
  msw: "^1.0.0",
158
- nodemon: "^3.0.1"
151
+ nodemon: "^3.0.1",
152
+ "terser-webpack-plugin": "^5.1.3",
153
+ webpack: "~5.96.0",
154
+ "webpack-dev-server": "^5.0.0"
159
155
  };
160
156
 
161
157
  exports.dependencies = dependencies;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.17.5-next.1";
3
+ var version = "0.17.5-next.2";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.3.0-next.2";
3
+ var version = "0.3.0-next.3";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var version = "0.11.0-next.1";
3
+ var version = "0.11.0-next.2";
4
4
 
5
5
  exports.version = version;
6
6
  //# sourceMappingURL=package.json.cjs.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/cli",
3
- "version": "0.34.0-next.1",
3
+ "version": "0.34.0-next.2",
4
4
  "description": "CLI for developing Backstage plugins and apps",
5
5
  "backstage": {
6
6
  "role": "cli"
@@ -63,20 +63,16 @@
63
63
  "@octokit/graphql-schema": "^13.7.0",
64
64
  "@octokit/oauth-app": "^4.2.0",
65
65
  "@octokit/request": "^8.0.0",
66
- "@pmmmwh/react-refresh-webpack-plugin": "^0.5.7",
67
66
  "@rollup/plugin-commonjs": "^26.0.0",
68
67
  "@rollup/plugin-json": "^6.0.0",
69
68
  "@rollup/plugin-node-resolve": "^15.0.0",
70
69
  "@rollup/plugin-yaml": "^4.0.0",
70
+ "@rspack/core": "^1.4.11",
71
+ "@rspack/dev-server": "^1.1.4",
72
+ "@rspack/plugin-react-refresh": "^1.4.3",
71
73
  "@spotify/eslint-config-base": "^15.0.0",
72
74
  "@spotify/eslint-config-react": "^15.0.0",
73
75
  "@spotify/eslint-config-typescript": "^15.0.0",
74
- "@sucrase/webpack-loader": "^2.0.0",
75
- "@svgr/core": "6.5.x",
76
- "@svgr/plugin-jsx": "6.5.x",
77
- "@svgr/plugin-svgo": "6.5.x",
78
- "@svgr/rollup": "6.5.x",
79
- "@svgr/webpack": "6.5.x",
80
76
  "@swc/core": "^1.3.46",
81
77
  "@swc/helpers": "^0.5.0",
82
78
  "@swc/jest": "^0.2.22",
@@ -96,7 +92,6 @@
96
92
  "css-loader": "^6.5.1",
97
93
  "ctrlc-windows": "^2.1.0",
98
94
  "esbuild": "^0.25.0",
99
- "esbuild-loader": "^4.0.0",
100
95
  "eslint": "^8.6.0",
101
96
  "eslint-config-prettier": "^9.0.0",
102
97
  "eslint-formatter-friendly": "^7.0.0",
@@ -107,9 +102,8 @@
107
102
  "eslint-plugin-react": "^7.37.2",
108
103
  "eslint-plugin-react-hooks": "^5.0.0",
109
104
  "eslint-plugin-unused-imports": "^4.1.4",
110
- "eslint-webpack-plugin": "^4.2.0",
105
+ "eslint-rspack-plugin": "^4.2.1",
111
106
  "express": "^4.17.1",
112
- "fork-ts-checker-webpack-plugin": "^9.0.0",
113
107
  "fs-extra": "^11.2.0",
114
108
  "git-url-parse": "^15.0.0",
115
109
  "glob": "^7.1.7",
@@ -125,7 +119,6 @@
125
119
  "jest-runtime": "^29.0.2",
126
120
  "json-schema": "^0.4.0",
127
121
  "lodash": "^4.17.21",
128
- "mini-css-extract-plugin": "^2.4.2",
129
122
  "minimatch": "^9.0.0",
130
123
  "node-stdlib-browser": "^1.3.1",
131
124
  "npm-packlist": "^5.0.0",
@@ -149,12 +142,10 @@
149
142
  "sucrase": "^3.20.2",
150
143
  "swc-loader": "^0.2.3",
151
144
  "tar": "^6.1.12",
152
- "terser-webpack-plugin": "^5.1.3",
145
+ "ts-checker-rspack-plugin": "^1.1.5",
153
146
  "ts-morph": "^24.0.0",
154
147
  "undici": "^7.2.3",
155
148
  "util": "^0.12.3",
156
- "webpack": "^5.94.0",
157
- "webpack-dev-server": "^5.0.0",
158
149
  "yaml": "^2.0.0",
159
150
  "yargs": "^16.2.0",
160
151
  "yml-loader": "^2.1.0",
@@ -168,7 +159,7 @@
168
159
  "@backstage/catalog-client": "1.11.0-next.0",
169
160
  "@backstage/config": "1.3.3",
170
161
  "@backstage/core-app-api": "1.18.0",
171
- "@backstage/core-components": "0.17.5-next.1",
162
+ "@backstage/core-components": "0.17.5-next.2",
172
163
  "@backstage/core-plugin-api": "1.10.9",
173
164
  "@backstage/dev-utils": "1.1.13-next.1",
174
165
  "@backstage/errors": "1.2.7",
@@ -179,9 +170,7 @@
179
170
  "@backstage/plugin-scaffolder-node-test-utils": "0.3.2-next.0",
180
171
  "@backstage/test-utils": "1.7.11-next.0",
181
172
  "@backstage/theme": "0.6.8-next.0",
182
- "@rspack/core": "^1.3.9",
183
- "@rspack/dev-server": "^1.1.1",
184
- "@rspack/plugin-react-refresh": "^1.4.2",
173
+ "@pmmmwh/react-refresh-webpack-plugin": "^0.5.7",
185
174
  "@types/cross-spawn": "^6.0.2",
186
175
  "@types/ejs": "^3.1.3",
187
176
  "@types/express": "^4.17.6",
@@ -199,22 +188,53 @@
199
188
  "@types/webpack-sources": "^3.2.3",
200
189
  "@types/yarnpkg__lockfile": "^1.1.4",
201
190
  "del": "^8.0.0",
191
+ "esbuild-loader": "^4.0.0",
192
+ "eslint-webpack-plugin": "^4.2.0",
193
+ "fork-ts-checker-webpack-plugin": "^9.0.0",
194
+ "mini-css-extract-plugin": "^2.4.2",
202
195
  "msw": "^1.0.0",
203
- "nodemon": "^3.0.1"
196
+ "nodemon": "^3.0.1",
197
+ "terser-webpack-plugin": "^5.1.3",
198
+ "webpack": "~5.96.0",
199
+ "webpack-dev-server": "^5.0.0"
204
200
  },
205
201
  "peerDependencies": {
206
- "@rspack/core": "^1.2.8",
207
- "@rspack/dev-server": "^1.0.9",
208
- "@rspack/plugin-react-refresh": "^1.0.0"
202
+ "@module-federation/enhanced": "^0.9.0",
203
+ "@pmmmwh/react-refresh-webpack-plugin": "^0.5.7",
204
+ "esbuild-loader": "^4.0.0",
205
+ "eslint-webpack-plugin": "^4.2.0",
206
+ "fork-ts-checker-webpack-plugin": "^9.0.0",
207
+ "mini-css-extract-plugin": "^2.4.2",
208
+ "terser-webpack-plugin": "^5.1.3",
209
+ "webpack": "~5.96.0",
210
+ "webpack-dev-server": "^5.0.0"
209
211
  },
210
212
  "peerDependenciesMeta": {
211
- "@rspack/core": {
213
+ "@module-federation/enhanced": {
214
+ "optional": true
215
+ },
216
+ "@pmmmwh/react-refresh-webpack-plugin": {
217
+ "optional": true
218
+ },
219
+ "esbuild-loader": {
220
+ "optional": true
221
+ },
222
+ "eslint-webpack-plugin": {
223
+ "optional": true
224
+ },
225
+ "fork-ts-checker-webpack-plugin": {
226
+ "optional": true
227
+ },
228
+ "mini-css-extract-plugin": {
229
+ "optional": true
230
+ },
231
+ "terser-webpack-plugin": {
212
232
  "optional": true
213
233
  },
214
- "@rspack/dev-server": {
234
+ "webpack": {
215
235
  "optional": true
216
236
  },
217
- "@rspack/plugin-react-refresh": {
237
+ "webpack-dev-server": {
218
238
  "optional": true
219
239
  }
220
240
  },
@@ -1,23 +0,0 @@
1
- 'use strict';
2
-
3
- function svgrTemplate({ imports, interfaces, componentName, props, jsx }, { tpl }) {
4
- const name = `${componentName.replace(/icon$/, "")}Icon`;
5
- const defaultExport = {
6
- type: "ExportDefaultDeclaration",
7
- declaration: { type: "Identifier", name }
8
- };
9
- return tpl`
10
- ${imports}
11
- import SvgIcon from '@material-ui/core/SvgIcon';
12
-
13
- console.log('DEPRECATION WARNING: The .icon.svg extension is deprecated, inline the SVG elements in a MUI SvgIcon instead.', Object.assign(new Error(), {name: 'Warning'}).stack);
14
-
15
- ${interfaces}
16
-
17
- const ${name} = (${props}) => React.createElement(SvgIcon, ${props}, ${jsx.children});
18
-
19
- ${defaultExport}`;
20
- }
21
-
22
- exports.svgrTemplate = svgrTemplate;
23
- //# sourceMappingURL=svgrTemplate.cjs.js.map