@gravity-ui/app-builder 0.26.2-beta.0 → 0.28.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.
@@ -155,7 +155,7 @@ async function buildDevServer(config) {
155
155
  options.ipc = path.resolve(paths_1.default.appDist, 'run/client.sock');
156
156
  }
157
157
  const proxy = options.proxy || [];
158
- if (config.client.lazyCompilation) {
158
+ if (config.client.lazyCompilation && bundler !== 'rspack') {
159
159
  proxy.push({
160
160
  context: ['/build/lazy'],
161
161
  target: `http://localhost:${config.client.lazyCompilation.port}`,
@@ -181,6 +181,7 @@ const svgoPreset = {
181
181
  function buildLibrary(config) {
182
182
  const internalGlobs = config.lib?.internalDirs?.map((dir) => `!${dir}/**/*`) ?? [];
183
183
  rimraf_1.rimraf.sync(paths_1.default.libBuild);
184
+ const tsConfigFilePath = path.resolve(paths_1.default.app, 'tsconfig.publish.json');
184
185
  // sources compilation
185
186
  const sourceStream = (0, fast_glob_1.globStream)(['**/*.{js,jsx,ts,tsx}', '!**/*.d.ts', ...internalGlobs], {
186
187
  cwd: paths_1.default.src,
@@ -216,6 +217,12 @@ function buildLibrary(config) {
216
217
  camel2DashComponentName: false,
217
218
  },
218
219
  ],
220
+ [
221
+ require.resolve('babel-plugin-tsconfig-paths-module-resolver'),
222
+ {
223
+ tsconfig: tsConfigFilePath,
224
+ },
225
+ ],
219
226
  require.resolve('./babel-plugin-replace-paths'),
220
227
  ],
221
228
  sourceMaps: true,
@@ -237,10 +244,9 @@ function buildLibrary(config) {
237
244
  });
238
245
  });
239
246
  // type definitions compilation and type checking
240
- const projectFilePath = path.resolve(paths_1.default.app, 'tsconfig.publish.json');
241
247
  const tscExec = path.resolve(paths_1.default.appNodeModules, 'typescript/bin/tsc');
242
248
  // eslint-disable-next-line security/detect-child-process
243
- childProcess.exec(`${tscExec} -p ${projectFilePath} --declaration --emitDeclarationOnly --outDir build/esm`, (error, stdout, stderr) => {
249
+ childProcess.exec(`${tscExec} -p ${tsConfigFilePath} --declaration --emitDeclarationOnly --outDir build/esm`, (error, stdout, stderr) => {
244
250
  logger_1.default.message(stdout);
245
251
  logger_1.default.error(stderr);
246
252
  if (!error && !stderr) {
@@ -294,12 +294,7 @@ function configureRspackExperiments(options) {
294
294
  // See https://github.com/web-infra-dev/rspack/issues/8503
295
295
  entries: false,
296
296
  imports: true,
297
- prefix: '/build/lazy-compilation-using-',
298
- client: require.resolve('./lazy-client.js'),
299
- test(module) {
300
- // make sure that lazy-client.js won't be lazy compiled)
301
- return !module.nameForCondition()?.endsWith('lazy-client.js');
302
- },
297
+ prefix: '/build/lazy-',
303
298
  };
304
299
  }
305
300
  const filesystemCacheOptions = typeof config.cache === 'object' && config.cache.type === 'filesystem'
@@ -3,9 +3,9 @@ export declare function createCli(argv: string[]): {
3
3
  [x: string]: unknown;
4
4
  verbose: boolean | undefined;
5
5
  cdn: string | undefined;
6
- c: unknown;
7
6
  env: string[] | undefined;
8
7
  target: "client" | "server" | undefined;
8
+ c: unknown;
9
9
  inspect: number | undefined;
10
10
  inspectBrk: number | undefined;
11
11
  "inspect-brk": number | undefined;
@@ -31,9 +31,9 @@ export declare function createCli(argv: string[]): {
31
31
  [x: string]: unknown;
32
32
  verbose: boolean | undefined;
33
33
  cdn: string | undefined;
34
- c: unknown;
35
34
  env: string[] | undefined;
36
35
  target: "client" | "server" | undefined;
36
+ c: unknown;
37
37
  inspect: number | undefined;
38
38
  inspectBrk: number | undefined;
39
39
  "inspect-brk": number | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/app-builder",
3
- "version": "0.26.2-beta.0",
3
+ "version": "0.28.0",
4
4
  "description": "Develop and build your React client-server projects, powered by typescript and webpack",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",
@@ -72,7 +72,7 @@
72
72
  "@pmmmwh/react-refresh-webpack-plugin": "^0.5.15",
73
73
  "@rsdoctor/rspack-plugin": "^1.0.2",
74
74
  "@rsdoctor/webpack-plugin": "^1.0.2",
75
- "@rspack/core": "1.3.7",
75
+ "@rspack/core": "1.3.9",
76
76
  "@rspack/dev-server": "^1.1.1",
77
77
  "@rspack/plugin-react-refresh": "^1.4.1",
78
78
  "@statoscope/webpack-plugin": "^5.29.0",
@@ -82,12 +82,13 @@
82
82
  "@svgr/core": "^8.1.0",
83
83
  "@svgr/plugin-jsx": "^8.1.0",
84
84
  "@svgr/webpack": "^8.1.0",
85
- "@swc/core": "1.10.12",
86
- "@swc/plugin-transform-imports": "6.4.0",
85
+ "@swc/core": "1.11.24",
86
+ "@swc/plugin-transform-imports": "7.0.3",
87
87
  "babel-loader": "^9.2.1",
88
88
  "babel-plugin-import": "^1.13.8",
89
89
  "babel-plugin-inline-react-svg": "^2.0.2",
90
90
  "babel-plugin-transform-react-remove-prop-types": "^0.4.24",
91
+ "babel-plugin-tsconfig-paths-module-resolver": "^1.0.4",
91
92
  "browserslist": "^4.24.0",
92
93
  "chalk": "^4.1.2",
93
94
  "circular-dependency-plugin": "^5.2.2",